mirror of
https://github.com/irssi/irssi.git
synced 2026-08-17 23:52:22 +02:00
Netsplit saved the NICK_REC, but didn't save the dynamically allocated strings
which were part of it. Removed it now and replaced it with saving only op/halfop/voice status. Might have caused some crashes? (hopefully did :) git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2234 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
parent
3b8622f1aa
commit
020861c698
6 changed files with 20 additions and 12 deletions
|
|
@ -132,7 +132,9 @@ static NETSPLIT_REC *netsplit_add(IRC_SERVER_REC *server, const char *nick,
|
|||
|
||||
splitchan = g_new0(NETSPLIT_CHAN_REC, 1);
|
||||
splitchan->name = g_strdup(channel->name);
|
||||
memcpy(&splitchan->nick, nickrec, sizeof(NICK_REC));
|
||||
splitchan->op = nickrec->op;
|
||||
splitchan->halfop = nickrec->halfop;
|
||||
splitchan->voice = nickrec->voice;
|
||||
|
||||
rec->channels = g_slist_append(rec->channels, splitchan);
|
||||
}
|
||||
|
|
@ -190,8 +192,9 @@ NETSPLIT_REC *netsplit_find(IRC_SERVER_REC *server, const char *nick,
|
|||
g_strcasecmp(rec->address, address) == 0) ? rec : NULL;
|
||||
}
|
||||
|
||||
NICK_REC *netsplit_find_channel(IRC_SERVER_REC *server, const char *nick,
|
||||
const char *address, const char *channel)
|
||||
NETSPLIT_CHAN_REC *netsplit_find_channel(IRC_SERVER_REC *server,
|
||||
const char *nick, const char *address,
|
||||
const char *channel)
|
||||
{
|
||||
NETSPLIT_REC *rec;
|
||||
GSList *tmp;
|
||||
|
|
@ -207,7 +210,7 @@ NICK_REC *netsplit_find_channel(IRC_SERVER_REC *server, const char *nick,
|
|||
NETSPLIT_CHAN_REC *rec = tmp->data;
|
||||
|
||||
if (g_strcasecmp(rec->name, channel) == 0)
|
||||
return &rec->nick;
|
||||
return rec;
|
||||
}
|
||||
|
||||
return NULL;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue