summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZido <Zido@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-04-07 17:20:46 +0000
committerZido <Zido@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-04-07 17:20:46 +0000
commit485a54dba08b7899002f3c9321f49af722a6a0d2 (patch)
tree937ec50f20a0d097fff180623c56ce8702b844bb
parent32a2ce0b53c66f171c266b9063405eade380e2ea (diff)
downloadhercules-485a54dba08b7899002f3c9321f49af722a6a0d2.tar.gz
hercules-485a54dba08b7899002f3c9321f49af722a6a0d2.tar.bz2
hercules-485a54dba08b7899002f3c9321f49af722a6a0d2.tar.xz
hercules-485a54dba08b7899002f3c9321f49af722a6a0d2.zip
- IRC User access levels now refresh on a mode set and join/part
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5948 54d463be-8e91-2dee-dedb-b68131a5f0ec
-rw-r--r--Changelog-Trunk.txt1
-rw-r--r--src/map/irc.c19
-rw-r--r--src/map/irc.h2
3 files changed, 21 insertions, 1 deletions
diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt
index 50a291539..9e4a14950 100644
--- a/Changelog-Trunk.txt
+++ b/Changelog-Trunk.txt
@@ -4,6 +4,7 @@ AS OF SVN REV. 5091, WE ARE NOW USING TRUNK. ALL UNTESTED BUGFIXES/FEATURES GO
IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.
2006/04/07
+ * IRC User access levels now refresh on a mode set and join/part. [Zido]
* Added missing creation/destruction of the expcache_ers in guild.c
[Skotlex]
* Unified status_remove_buffs/status_remove_debuffs into a single function.
diff --git a/src/map/irc.c b/src/map/irc.c
index 621201fa4..05cc16d56 100644
--- a/src/map/irc.c
+++ b/src/map/irc.c
@@ -275,6 +275,13 @@ void irc_parse_sub(int fd, char *incoming_string)
parse_names_packet(incoming_string);
}
+ // Refresh Names [Zido]
+ if((strcmpi(command,"join")==0)||(strcmpi(command,"part")==0)||(strcmpi(command,"mode")==0)) {
+ irc_rmnames();
+ sprintf(send_string,"NAMES %s",irc_channel);
+ irc_send(send_string);
+ }
+
return;
}
@@ -431,3 +438,15 @@ int get_access(char *nick) {
return -1;
}
+
+int irc_rmnames() {
+ int i=0;
+
+ for(i=0;i<=MAX_CHANNEL_USERS;i++) {
+ memset(cd.user[i].name,'\0',256);
+ cd.user[i].level=0;
+ }
+ last_cd_user=0;
+
+ return 0;
+}
diff --git a/src/map/irc.h b/src/map/irc.h
index 829733c01..d042fc29a 100644
--- a/src/map/irc.h
+++ b/src/map/irc.h
@@ -48,4 +48,4 @@ int parse_names_packet(char *str);
int parse_names(char *str);
int set_access(char *nick,int level);
int get_access(char *nick);
-int parse_mode(char *mode,char *nick);
+int irc_rmnames();