BeBot - An Anarchy Online and Age Of Conan chat automaton

Archive => Anarchy Online Archive => 0.2.x Custom/Unofficial Modules => Topic started by: Blondengy on September 19, 2005, 05:41:48 pm

Title: IRC
Post by: Blondengy on September 19, 2005, 05:41:48 pm
Due to big demand I've now made an IRC module.
It relays chat between IRC and the guilchannel and/or privategroup. When running this on a bot in raidbot mode be sure to run it in privategroup only mode.

Download:
irc.zip (http://bebot.fieses.net/files/irc.zip) (26 kb)


Commands:

Quote from: "BeBot Help"
!irc server <servername>
Configures the module to connect to <servername>.
!irc port <port>
Configures the module to connect to port number <port> (default: 6667).
!irc channel <chan>
Configures the module to join the channel <chan> when it connects.

!irc connect
Makes the bot connect to the IRC server and start the relay.
!irc disconnect
Disconnects the bot from IRC and stops relay.

!irc channelkey <key>
Uses <key> as the channel key when joining the channel (default: #bebot).
!irc nick <nick>
Connects to IRC using <nick> as its nickname (default: <botname>).

!irc announce (on|off)
Switch announcing joining/leaving on or off (default: on).

!irc ircprefix <prefix>
Set the prefix in IRC to <prefix> (default: [GUILD]).
!irc guildprefix <prefix>
Set the prefix in the guildchannel to <prefix> (default: [IRC]).

!irc reconnect (on|off)
Automatically reconnect when bot is restarted (default: on).

!irc relayguildname <guild>
If you are relaying GC between two guilds you must set the name of the other guild with this command so that the IRC messages are also relayed between the GCs <guild>.

!irc itemref (auno|aodb)
Choose what site itemrefs in IRC are linked to (default: aodb)

!irc chat (gc|pgroup|both)
Set what channels are relayed to and from (default: gc)


All above commands are admin-only

Commands that work in IRC:
!online
!is <nickname>
Title: IRC
Post by: Khalem on October 11, 2005, 12:04:21 pm
Working almost flawlessly so far.

I have however noticed that the bot wont automatically reconnect to IRC if disconnected by Excess flood or Ping Timeout.
Title: IRC
Post by: Glarawyn on October 11, 2005, 11:59:07 pm
Maybe I'm just nutty, but loading this module caused the bot not to start until I had manually inserted the minimum configuration information into the database.
Title: IRC
Post by: Naturalistic on October 12, 2005, 02:26:10 am
I told you what you need to do Glara... tsk tsk :P

You just edit a few lines in the IRC.php.
Title: IRC
Post by: skeezix on November 29, 2005, 06:12:09 pm
I may be blind as well :D

When trying to load this module on bot start/login it crashes .

I'm quite noob to SQL, but this seemed to work on my end.  And ehh... erm... let me know if this code is just downright awful for SQL lol

Code: [Select]

INSERT INTO settings (setting, value) VALUES ('irc_server', '');
INSERT INTO settings (setting, value) VALUES ('irc_port', '');
INSERT INTO settings (setting, value) VALUES ('irc_chan', '');
INSERT INTO settings (setting, value) VALUES ('irc_chankey', '');
INSERT INTO settings (setting, value) VALUES ('irc_nick', '');
INSERT INTO settings (setting, value) VALUES ('irc_guildprefix', '');
INSERT INTO settings (setting, value) VALUES ('irc_ircprefix', '');
INSERT INTO settings (setting, value) VALUES ('irc_announce', '');
INSERT INTO settings (setting, value) VALUES ('irc_reconnect', '');
INSERT INTO settings (setting, value) VALUES ('irc_relayguildname', '');
INSERT INTO settings (setting, value) VALUES ('irc_itemref', '');
INSERT INTO settings (setting, value) VALUES ('irc_chat', '');


I put this into irc.sql and did a source from mysql console
Title: IRC
Post by: Akarah on November 29, 2005, 09:18:21 pm
edit the parts in IRC.php where it actually gets that data from the db, then if that result is empty, sets a default. i believe the server default is empty, which is causing the problem. you can set default values in IRC.php then re-set them in the db (via in-game commands) and it works fine.
Title: Re: IRC
Post by: Neo-Vortex on January 23, 2006, 02:43:12 am
Anyone got a valid link for irc.zip? :)
Title: Re: IRC
Post by: myste on February 27, 2006, 11:21:24 am
Using the SVN version im getting just spammed with the following warning:

Quote
PHP Warning:  array_key_exists(): The second argument should be either an array or an object in <bot home dir>/IRC/SmartIRC.php on line 1948

And the bot doesnt seem to want to join the channel i specified. (it appears to connect to the server ok, but not the channel)

ANy ideas??
Title: Re: IRC
Post by: Mephistobane on July 01, 2006, 02:48:49 pm
what about having to authserv and etc stuff like that?
Title: Re: IRC
Post by: Mephistobane on July 02, 2006, 02:05:25 am
im using the SVN version too and it seems to connect to the server, but doesn't want to join channels...

so help here would be appreciated :)
SimplePortal 2.3.7 © 2008-2024, SimplePortal