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
-
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:
!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>
-
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.
-
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.
-
I told you what you need to do Glara... tsk tsk :P
You just edit a few lines in the IRC.php.
-
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
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
-
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.
-
Anyone got a valid link for irc.zip? :)
-
Using the SVN version im getting just spammed with the following warning:
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??
-
what about having to authserv and etc stuff like that?
-
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 :)