Update of /cvsroot/ayttm/ayttm/modules/irc/libirc
In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv13011/libirc
Modified Files:
irc_message.c libirc.c libirc.h
Log Message:
* Fixed some build warnings
* Now message gets highlighted when someone mentions our nickname, regardless
of where is it mentioned
* Fixed a couple of memory leaks
* Removed printing messages from servers
Index: irc_message.c
===================================================================
RCS file: /cvsroot/ayttm/ayttm/modules/irc/libirc/irc_message.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- irc_message.c 24 Jul 2009 13:09:42 -0000 1.4
+++ irc_message.c 7 Sep 2009 07:13:03 -0000 1.5
@@ -845,6 +845,14 @@
}
if (prefix) {
+ if (prefix->user)
+ free(prefix->user);
+ if (prefix->hostname)
+ free(prefix->hostname);
+ if (prefix->servername)
+ free(prefix->servername);
+ if (prefix->nick)
+ free(prefix->nick);
free(prefix);
prefix = NULL;
}
Index: libirc.c
===================================================================
RCS file: /cvsroot/ayttm/ayttm/modules/irc/libirc/libirc.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- libirc.c 13 Aug 2009 20:20:38 -0000 1.7
+++ libirc.c 7 Sep 2009 07:13:03 -0000 1.8
@@ -19,11 +19,19 @@
*
*/
-
-
#include "libirc.h"
#include "ctcp.h"
+static char irc_modes[] =
+{
+ 'a',
+ 'i',
+ 'w',
+ 'r',
+ 'o',
+ 'O',
+ 's'
+};
/* LOGIN */
void irc_login( const char *password, int mode, irc_account *ia )
@@ -404,9 +412,9 @@
return 0;
buf[len-1]='\0';
-//#ifdef IRCDEBUG
- fprintf(stderr, "irc> %s\n", buf);
-//#endif
+
+// fprintf(stderr, "irc> %s\n", buf);
+
irc_message_parse(buf, ia);
return 1;
Index: libirc.h
===================================================================
RCS file: /cvsroot/ayttm/ayttm/modules/irc/libirc/libirc.h,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- libirc.h 13 Aug 2009 20:20:38 -0000 1.7
+++ libirc.h 7 Sep 2009 07:13:03 -0000 1.8
@@ -73,14 +73,6 @@
IRC_SIGNON_INVISIBLE = 8
};
-static char *irc_states[] =
-{
- "Online",
- "Away",
- "Invisible",
- "Offline"
-};
-
/* User modes */
enum {
IRC_USER_MODE_AWAY = 1,
@@ -106,18 +98,6 @@
struct _irc_param_list *next;
} irc_param_list ;
-static char irc_modes[] =
-{
- 'a',
- 'i',
- 'w',
- 'r',
- 'o',
- 'O',
- 's'
-};
-
-
struct _irc_callbacks;
typedef struct {
|