Jacek Kowalski
2012-08-12 127d1a1c43ffa12db0d68fa3dfd9781c6e5b4480
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 ?>