wm: libirc

Download patch

ref: 271c3b1647562df4a689e0d2ee5feb4c8d9a3edd
parent: f284581fdb7648abdc75940d1d7a2c09cbedb8c3
author: Nima <nimaa@tuta.io>
date: Sun Oct 16 22:39:02 EDT 2022

minor fixes

--- a/irc.c
+++ b/irc.c
@@ -19,6 +19,7 @@
 int irc_init_session(irc_session_t* s, const char* serv, const char* portno, const char* nick, const char* pass, irc_event_handler_set_t* es) {
 
 	memset(s, 0, sizeof(irc_session_t));
+	memset(es, 0, sizeof(irc_event_handler_set_t));
 
 	if (serv == NULL || portno == NULL || nick == NULL)
 		return -1;
@@ -44,7 +45,7 @@
 	va_end(ap);
 	int nwrote = irc_socket_send(s->sockfd, buffer, n);
 #ifdef IRC_DEBUG_MODE
-	udbug("irc_send_raw(): wrote %d bytes into s->sockfd.", nwrote);
+	udebug("irc_send_raw(): wrote %d bytes into s->sockfd.", nwrote);
 #endif
 	return nwrote;
 }
@@ -248,6 +249,7 @@
 		case WORDL('J', 'O', 'I', 'N'):
 			if (s->event_handlers.join_handler)
 				ret = s->event_handlers.join_handler(s, m);
+			break;
 	}
 	return ret;
 }