wm: libirc

Download patch

ref: 3cdb6ca740bdc00ca00874764f49af4c5a3d5c97
parent: 17458bf1d250193217a13ff6c24f0b7d458f2f9a
author: Nima <nimaa@tuta.io>
date: Thu Oct 13 14:52:00 EDT 2022

fixed typos

--- a/irc.c
+++ b/irc.c
@@ -43,7 +43,7 @@
 	/* TODO: */
 	va_end(ap);
 	int nwrote = irc_socket_send(s->sockfd, buffer, n);
-#ifdef IRC_DEBUG
+#ifdef IRC_DEBUG_MODE
 	udbug("irc_send_raw(): wrote %d bytes into s->sockfd.", nwrote);
 #endif
 	return nwrote;
@@ -51,7 +51,7 @@
 
 
 int irc_connect(irc_session_t* s) {
-#ifdef IRC_DEBUG
+#ifdef IRC_DEBUG_MODE
 	udebug("irc_connect(): connecting to %s:%s", s->server, s->portno);
 #endif
 	/* RFC 1459:
@@ -63,7 +63,7 @@
 	if (s->sockfd == -1) {
 		return -1; // FIXME: proper error messages
 	}
-#ifdef IRC_DEBUG
+#ifdef IRC_DEBUG_MODE
 	udebug("irc_connect() registering as NICK : %s USER: %s PASS: %s", s->nick, s->nick, s->password);
 #endif
 	if (s->password)
@@ -70,7 +70,7 @@
 		irc_send_raw(s, "PASS %s \r\n", s->password);
 	irc_send_raw(s, "NICK %s \r\n", s->nick);
 	irc_send_raw(s, "USER %s * * : AAAA\r\n", s->nick);
-#ifdef IRC_DEBUG
+#ifdef IRC_DEBUG_MODE
 	udebug("irc_connect(), sucessfully connected.");
 #endif
 	/* some irc servers require that we ping them first */
@@ -145,7 +145,7 @@
 
 		*prefix_end = '\0';
 		p = prefix_end + 1;
-#ifdef IRC_DEBUG
+#ifdef IRC_DEBUG_MODE
 		udebug("msg->prefix_name = %s, msg->prefix_user = %s, msg->prefix_host = %s", msg->prefix_name, msg->prefix_user, msg->prefix_host);
 #endif
 	}
@@ -153,7 +153,7 @@
 	char *params_start = irc_str_skip_to(p, ' ');
 
 	if (!params_start) {
-#ifdef IRC_DEBUG_MOD
+#ifdef IRC_DEBUG_MODE
 		uerror("we don't have params_start.");
 #endif
 		goto invalid_msg;
@@ -203,7 +203,7 @@
 invalid_msg:
 
 
-#ifdef IRC_DEBUG
+#ifdef IRC_DEBUG_MODE
 	uerror("invalid message(%s)", buffer);
 #endif
 
--- a/irc.h
+++ b/irc.h
@@ -83,4 +83,4 @@
 void irc_send_join(irc_session_t* s, const char *channel);
 void irc_send_privmsg(irc_session_t* s, const char *guy, const char *msg);
 void irc_send_nick(irc_session_t* s, const char *nick);
-void irc_sendf_privmsg(irc_session_t* s, const char *guy, const char *format, ...);
+void irc_sendv_privmsg(irc_session_t* s, const char *guy, const char *format, ...);