summaryrefslogtreecommitdiff
path: root/src/map
diff options
context:
space:
mode:
authorZido <Zido@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-04-18 21:28:35 +0000
committerZido <Zido@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-04-18 21:28:35 +0000
commit7ce278a93a2f577d7513b59f497ebe5f4b6ebb8c (patch)
tree13d361ca18a302db16c1352404656a431ab7b60f /src/map
parent8eb561a6c0ec23aa31e46aee768e1dacee9ebe90 (diff)
downloadhercules-7ce278a93a2f577d7513b59f497ebe5f4b6ebb8c.tar.gz
hercules-7ce278a93a2f577d7513b59f497ebe5f4b6ebb8c.tar.bz2
hercules-7ce278a93a2f577d7513b59f497ebe5f4b6ebb8c.tar.xz
hercules-7ce278a93a2f577d7513b59f497ebe5f4b6ebb8c.zip
- IRC Bot can now auto-join when kicked from the channel
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6170 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map')
-rw-r--r--src/map/irc.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/map/irc.c b/src/map/irc.c
index fa464a33a..4cd57b60d 100644
--- a/src/map/irc.c
+++ b/src/map/irc.c
@@ -41,6 +41,8 @@ typedef int socklen_t;
short use_irc=0;
+short irc_autojoin=0;
+
short irc_announce_flag=1;
short irc_announce_mvp_flag=1;
short irc_announce_jobchange_flag=1;
@@ -313,6 +315,12 @@ void irc_parse_sub(int fd, char *incoming_string)
irc_send(send_string);
printf("Done\n");
}
+
+ // Autojoin on kick [Zido]
+ else if((strcmpi(command,"kick")==0)&&(irc_autojoin==1)) {
+ sprintf(send_string,"JOIN %s",target);
+ irc_send(send_string);
+ }
}
// Names Reply [Zido]
@@ -526,6 +534,8 @@ int irc_read_conf(char *file) {
strcpy(irc_ip_str,w2);
else if(strcmpi(w1,"irc_port")==0)
irc_port=atoi(w2);
+ else if(strcmpi(w1,"irc_autojoin")==0)
+ irc_autojoin=atoi(w2);
else if(strcmpi(w1,"irc_channel")==0)
strcpy(irc_channel,w2);
else if(strcmpi(w1,"irc_trade_channel")==0)