[srvx-commits] CVS: services/src proto-bahamut.c,1.7,1.8
Brought to you by:
entrope
|
From: Zoot <zo...@us...> - 2002-08-02 00:41:19
|
Update of /cvsroot/srvx/services/src
In directory usw-pr-cvs1:/tmp/cvs-serv21650/src
Modified Files:
proto-bahamut.c
Log Message:
Fix a compile warning in the Bahamut protocol support and process ping messages in the same way the P10 code does for consistency.
Index: proto-bahamut.c
===================================================================
RCS file: /cvsroot/srvx/services/src/proto-bahamut.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -r1.7 -r1.8
*** proto-bahamut.c 8 Jul 2002 15:45:32 -0000 1.7
--- proto-bahamut.c 2 Aug 2002 00:41:16 -0000 1.8
***************
*** 120,123 ****
--- 120,128 ----
}
+ if (!is_valid_nick(nick)) {
+ log(MAIN_LOG, LOG_WARNING, "AddUser(%p, %s, ...): invalid nickname detected.\n", uplink, nick);
+ return NULL;
+ }
+
if (strlen(nick) > nicklen) {
log(MAIN_LOG, LOG_ERROR, "AddUser(%p, %s, ...): nick too long (detected max is %d)\n", uplink, nick, nicklen);
***************
*** 659,665 ****
static CMD_FUNC(cmd_ping)
{
! (void)origin;
! if (argc < 2) return 0;
! irc_pong(argv[1]);
timeq_del(0, timed_send_ping, 0, TIMEQ_IGNORE_WHEN|TIMEQ_IGNORE_DATA);
timeq_del(0, timed_ping_timeout, 0, TIMEQ_IGNORE_WHEN|TIMEQ_IGNORE_DATA);
--- 664,669 ----
static CMD_FUNC(cmd_ping)
{
! (void)argv;(void)argc;
! irc_pong(origin);
timeq_del(0, timed_send_ping, 0, TIMEQ_IGNORE_WHEN|TIMEQ_IGNORE_DATA);
timeq_del(0, timed_ping_timeout, 0, TIMEQ_IGNORE_WHEN|TIMEQ_IGNORE_DATA);
|