First you have to add the alias to the remote side of mIRC scripts with the following function put into the remote part of the scripts with mIRC Scripts.
You then have to create the plugin for X-Rest 1.52 on XOOPS 2.5.x to talk to twitterbomb 1.27 classes systems.
This interacts when the alias function detects a rude comment tweets it via the X-REST 1.52 API Plugin, or schedules it be tweeted later if you have had the channel go quiet and you have met your hourly tweet limit through TwitterBomb 1.27 Class Structures with this X-REST 1.52 Plugin: This in this example is for the channel #php.
<?php function tweet_xsd(){ $xsd = array(); $i=0; $xsd['request'][$i++] = array("name" => "username", "type" => "string"); $xsd['request'][$i++] = array("name" => "password", "type" => "string"); $xsd['request'][$i++] = array("name" => "nick", "type" => "string"); $xsd['request'][$i++] = array("name" => "message", "type" => "string"); $i=0; $xsd['response'][$i++] = array("name" => "ERRNUM", "type" => "integer"); $xsd['response'][$i++] = array("name" => "RESULT", "type" => "string"); $xsd['response'][$i++] = array("name" => "CODE", "type" => "string"); return $xsd; } function tweet_wsdl(){ } function tweet_wsdl_service(){ } function tweet($username, $password, $nick, $message) { if (strlen($message)<10||(!strpos($message, 'a')&&!strpos($message, 'e')&&!strpos($message, 'i')&&!strpos($message, 'o')&&!strpos($message, 'u'))) { return array('CODE' => 300); } global $xoopsModuleConfig, $xoopsConfig; if ($xoopsModuleConfig['site_user_auth']==1){ if ($ret = check_for_lock(basename(__FILE__),$username,$password)) { return $ret; } if (!checkright(basename(__FILE__),$username,$password)) { mark_for_lock(basename(__FILE__),$username,$password); return array('ErrNum'=> 9, "ErrDesc" => 'No Permission for plug-in'); } } include($GLOBALS['xoops']->path('modules/twitterbomb/include/functions.php')); xoops_load('cache'); set_time_limit(480); $GLOBALS['myts'] = MyTextSanitizer::getInstance(); $module_handler = xoops_gethandler('module'); $config_handler = xoops_gethandler('config'); $GLOBALS['twitterbombModule'] = $module_handler->getByDirname('twitterbomb'); $GLOBALS['twitterbombModuleConfig'] = $config_handler->getConfigList($GLOBALS['twitterbombModule']->getVar('mid')); $tweet = '#'.str_replace(array('@', '+', '%'), '', $nick).' - '.twitterbomb_TweetString(htmlspecialchars_decode(urldecode($message)), $GLOBALS['twitterbombModuleConfig']['scheduler_aggregate'], $GLOBALS['twitterbombModuleConfig']['scheduler_wordlength']); $log_handler=xoops_getmodulehandler('log', 'twitterbomb'); $scheduler_handler=xoops_getmodulehandler('scheduler', 'twitterbomb'); $oauth_handler=xoops_getmodulehandler('oauth', 'twitterbomb'); $urls_handler=xoops_getmodulehandler('urls', 'twitterbomb'); $oauth = $oauth_handler->getRootOauth(true); $ret = XoopsCache::read('tweetbomb_scheduler_'.md5('2'.'2')); if ($scheduler_handler->getCount(new Criteria('text', $tweet, 'LIKE'))==0) { $schedule = $scheduler_handler->create(); $schedule->setVar('cid', '2'); $schedule->setVar('catid', '2'); $schedule->setVar('mode', 'direct'); $schedule->setVar('pre', '#sex'); $schedule->setVar('text', $tweet); $schedule->setVar('uid', user_uid($username, $password)); $schedule->setVar('when', time()); $schedule->setVar('tweeted', 0); $schedule = $scheduler_handler->get($scheduler_handler->insert($schedule, true)); $url = $urls_handler->getUrl($schedule->getVar('cid'), $schedule->getVar('catid')); $link = XOOPS_URL.'/modules/twitterbomb/go.php?sid='.$schedule->getVar('sid').'&cid='.$schedule->getVar('cid').'&catid='.$schedule->getVar('catid').'&uri='.urlencode( sprintf($url, urlencode(str_replace(array('#', '@'), '',$tweet)))); $log = $log_handler->create(); $log->setVar('provider', 'scheduler'); $log->setVar('cid', $schedule->getVar('cid')); $log->setVar('catid', $schedule->getVar('catid')); $log->setVar('sid', $schedule->getVar('sid')); $log->setVar('url', $link); $log->setVar('tweet', substr($tweet,0,139)); $log->setVar('tags', twitterbomb_ExtractTags($tweet)); $log = $log_handler->get($lid = $log_handler->insert($log, true)); $link = XOOPS_URL.'/modules/twitterbomb/go.php?sid='.$schedule->getVar('sid').'&cid='.$schedule->getVar('cid').'&lid='.$lid.'&catid='.$schedule->getVar('catid').'&uri='.urlencode( sprintf($url, urlencode(str_replace(array('#', '@'), '',$tweet)))); $link = twitterbomb_shortenurl($link); $log->setVar('url', $link); $log = $log_handler->get($lid = $log_handler->insert($log, true)); if ($id = $oauth->sendTweet($schedule->getVar('pre').' '.$tweet, $link, true)) { $schedule->setVar('tweeted', time()); $scheduler_handler->insert($schedule, true); if ($GLOBALS['twitterbombModuleConfig']['tags']) { $tag_handler = xoops_getmodulehandler('tag', 'tag'); $tag_handler->updateByItem(twitterbomb_ExtractTags($tweet), $lid, $GLOBALS['twitterbombModule']->getVar("dirname"), $schedule->getVar('catid')); } $log->setVar('id', $id); $log->setVar('alias', $nick); $log_handler->insert($log, true); $ret[]['title'] = $tweet; $ret[sizeof($ret)]['link'] = $link; $ret[sizeof($ret)]['description'] = htmlspecialchars_decode($tweet); $ret[sizeof($ret)]['lid'] = $lid; $ret[sizeof($ret)]['sid'] = $schedule->getVar('sid'); if (count($ret)>$GLOBALS['twitterbombModuleConfig']['scheduler_items']) { foreach($ret as $key => $value) { if (count($ret)>$GLOBALS['twitterbombModuleConfig']['scheduler_items']) unset($ret[$key]); } } XoopsCache::write('tweetbomb_scheduler_'.md5('2'.'2'), $ret, ($GLOBALS['twitterbombModuleConfig']['interval_of_cron']+$GLOBALS['twitterbombModuleConfig']['scheduler_cache'])*100); XoopsCache::read('tweetbomb_channel_last', array('last'=>time()), 60*70); return array('CODE' => 200); } else { $schedule->setVar('tweeted', 0); $scheduler_handler->insert($schedule, true); XoopsCache::read('tweetbomb_channel_last', array('last'=>time()), 60*70); @$log_handler->delete($log, true); return array('CODE' => 100); } } } else { XoopsCache::read('tweetbomb_channel_last', array('last'=>time()), 60*70); return array('CODE' => 100); } ?>
then you need to activate the scanning for it with the following code in remote of mirc as well