SRB2MS_BOT Besides Tools Folder

Status
Not open for further replies.

Armonte

montobot / Armontina
Where can I get the SRB2MS_BOT script .php file at? I found one in my Tools folder but it has no quit command. Thanks.
 
Did you look at SRB2MS_Bot_beta.php? That one has the quit command. It should be right next to SRB2MS_Bot.php.
 
JRose said:
Did you look at SRB2MS_Bot_beta.php? That one has the quit command. It should be right next to SRB2MS_Bot.php.
Yes The one im looking for also has !amibanned. D:
 
I used TextPad and searched for quit and found this.

Code:
function byebye(&$irc, &$data)
	{
		foreach ($irc->channel['#srb2fun']->ops as $quitnick => $key )
		{
			if ($data->nick == $quitnick)
			{
				$irc->setAutoReconnect(FALSE);
				$irc->setAutoRetry(FALSE);
				$irc->quit('This quit was done by' + "$data->nick");
				return;
			}
		}
	}
That is what you are looking for?
 
JRose said:
I used TextPad and searched for quit and found this.

Code:
function byebye(&$irc, &$data)
	{
		foreach ($irc->channel['#srb2fun']->ops as $quitnick => $key )
		{
			if ($data->nick == $quitnick)
			{
				$irc->setAutoReconnect(FALSE);
				$irc->setAutoRetry(FALSE);
				$irc->quit('This quit was done by' + "$data->nick");
				return;
			}
		}
	}
That is what you are looking for?
Nopes.
<Cue> Although I suggest you uncomment the quit command
00<Armonte> upload it then close?
<Cue> Upload it, open it in browser, wait for connection, close
00<Armonte> ok
<Cue> But, like I said
<Cue> Uncomment the quit command
00<Armonte> how
<Cue> !shutdown I think
00<Armonte> ok
<Cue> Search for shutdown
00<Armonte> abusive?
<Cue> Only works for certain people, IIRC
<Cue> So change Logan's name to you
<Cue> Actually
<Cue> Wait
<Cue> It works for ops :P
 
Armonte said:
JRose said:
Did you look at SRB2MS_Bot_beta.php? That one has the quit command. It should be right next to SRB2MS_Bot.php.
Yes The one im looking for also has !amibanned. D:

No, you're not looking for that one, that one is for the MySQL based Master Server which isn't finished yet. Even when it's done, you need the database structure which I'd rather not give out for security purposes. ^_~

There's a commented out line in SRB2MS_Bot_Beta.php, this one:
Code:
//$esperirc->registerActionhandler(SMARTIRC_TYPE_CHANNEL, '^!shutdown$', $bot, 'byebye');

Remove the '//' at the beginning. Also, you may want to edit this block of code:

Code:
//$esperirc->registerActionhandler(SMARTIRC_TYPE_CHANNEL, '^!gamelist$', $bot, 'ListGamesChan');
//$esperirc->registerActionhandler(SMARTIRC_TYPE_QUERY, '^!gamelist$', $bot, 'ListGamesPM');
//$esperirc->registerActionhandler(SMARTIRC_TYPE_QUERY, '^!RSSgamelist$', $bot, 'RSSListGamesPM');
$esperirc->registerActionhandler(SMARTIRC_TYPE_CHANNEL, '^!gamelist$', $bot, 'RSSListGames');

To this:

Code:
//$esperirc->registerActionhandler(SMARTIRC_TYPE_CHANNEL, '^!gamelist$', $bot, 'ListGamesChan');
$esperirc->registerActionhandler(SMARTIRC_TYPE_QUERY, '^!gamelist$', $bot, 'ListGamesPM');
//$esperirc->registerActionhandler(SMARTIRC_TYPE_QUERY, '^!RSSgamelist$', $bot, 'RSSListGamesPM');
//$esperirc->registerActionhandler(SMARTIRC_TYPE_CHANNEL, '^!gamelist$', $bot, 'RSSListGames');

Since you want socket connections to the MS, really. Also, if you comment the ListGamesPM one and uncomment ListGamesChan, it'll give you a list in the channel, as opposed to a notice.

Oh, and comment this out too:

Code:
$esperirc->registerTimehandler(120000, $bot, 'RSSListUpdate');

At least, I think that's all right, not sure if the current bot uses socket connections or RSS, all I did was remove both of them and add MySQL connections when I messed with it. ;P
 
It's PHP, learn to like it, pretty much every dynamic site that isn't running on ASP uses it, including this one.
 
Status
Not open for further replies.

Who is viewing this thread (Total: 1, Members: 0, Guests: 1)

Back
Top