irctk

libircclient binding for scripts
git clone https://a3nm.net/git/irctk/
Log | Files | Refs | README

commit 42f7494bef2fb47ae2909e02694b4b6c20dfec43
parent 6b2f7e5c2a6b9e91e2d4d9b7679321e2c09175af
Author: Antoine Amarilli <a3nm@a3nm.net>
Date:   Sat, 28 Jul 2012 01:25:11 +0200

don't call irc_target_get_nick on NULL

Diffstat:
irctk.c | 7++++++-
1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/irctk.c b/irctk.c @@ -1234,7 +1234,12 @@ void manage_event (irc_session_t *session, const char *event, const char *origin char temp[MAX_NICK_LEN+1]; saw_user(origin); - irc_target_get_nick(origin, temp, MAX_NICK_LEN); + if (origin) { + debug("irc_target_get_nick(%s, %d)\n", origin, MAX_NICK_LEN); + irc_target_get_nick(origin, temp, MAX_NICK_LEN); + } else { + temp[0] = 0; + } if (!strcmp(temp, args.nick)) { // it is us, store our hostname irc_target_get_host(origin, args.hostname, MAX_NICK_LEN);