diff options
author | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-03-22 14:08:03 +0000 |
---|---|---|
committer | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-03-22 14:08:03 +0000 |
commit | d36bb8c6615fe658b2ef5f860fae9c8b8f2a556c (patch) | |
tree | d37a16c8083f97a4202185c28e9090800cb7f478 /src/map/irc.c | |
parent | 8c4dac13b816b2e3d95cd068f7c2c73ef52bb541 (diff) | |
download | hercules-d36bb8c6615fe658b2ef5f860fae9c8b8f2a556c.tar.gz hercules-d36bb8c6615fe658b2ef5f860fae9c8b8f2a556c.tar.bz2 hercules-d36bb8c6615fe658b2ef5f860fae9c8b8f2a556c.tar.xz hercules-d36bb8c6615fe658b2ef5f860fae9c8b8f2a556c.zip |
- Some cleanups in irc.c
- Changed ASC_BREAKER's cast to 700ms
- Magic skills that ignore element now also don't take into account elemental cards.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5702 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/irc.c')
-rw-r--r-- | src/map/irc.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/map/irc.c b/src/map/irc.c index 276dcccb8..c61c5d890 100644 --- a/src/map/irc.c +++ b/src/map/irc.c @@ -135,6 +135,10 @@ int irc_parse(int fd) {
if (session[fd]->eof){
do_close(fd);
+ if (irc_si) {
+ aFree(irc_si);
+ irc_si = NULL;
+ }
add_timer(gettick() + 15000, irc_connect_timer, 0, 0);
return 0;
}
@@ -143,8 +147,10 @@ int irc_parse(int fd) irc_si->fd = fd;
irc_si->state = 0;
session[fd]->session_data = irc_si;
+ } else if (!irc_si) {
+ irc_si = (struct IRC_Session_Info*)session[fd]->session_data;
+ irc_si->fd = fd;
}
- irc_si = (struct IRC_Session_Info*)session[fd]->session_data;
if(RFIFOREST(fd) > 0){
char *incoming_string=aCalloc(RFIFOREST(fd),sizeof(char));
memcpy(incoming_string,RFIFOP(fd,0),RFIFOREST(fd));
|