Jacek Kowalski
2014-11-01 905c85813a24f02050421df8a7b1bf7ffbf4d987
commit | author | age
8bd4d9 1 <?php
JK 2 class bot_legacy_module implements BotModule {
3     function handle($msg, $params) {
4         require_once(BOT_TOPDIR.'/modules/'.$params[0]);
5         
6         if(!defined('BOT_TYPE')) {
7             define('BOT_TYPE', $msg->userAlt->interface);
8         }
9         
10         $_GET['to'] = $msg->userAlt->bot;
11         $_GET['from'] = $msg->userAlt->uid;
12         
13         try {
14             call_user_func(array($params[1], $params[2]), $msg->command, $msg->args);
15         }
16         catch(BotLegacyEnd $e) {
17         }
18         
19         return GGapi::getResponse();
20     }
21 }
22 ?>