Update of /cvsroot/srvx/services/src
In directory usw-pr-cvs1:/tmp/cvs-serv8520/src
Modified Files:
chanserv.c
Log Message:
Truncate long kick messages in ChanServ so that the kicker's nick cannot be hidden.
Index: chanserv.c
===================================================================
RCS file: /cvsroot/srvx/services/src/chanserv.c,v
retrieving revision 1.304
retrieving revision 1.305
diff -C2 -r1.304 -r1.305
*** chanserv.c 11 Nov 2002 03:20:09 -0000 1.304
--- chanserv.c 11 Nov 2002 04:20:03 -0000 1.305
***************
*** 2842,2845 ****
--- 2842,2852 ----
{
reason = unsplit_string(argv + offset, argc - offset, NULL);
+ if(strlen(reason) > (TOPICLEN - (NICKLEN + 3)))
+ {
+ /* Truncate the reason to a length of TOPICLEN, as
+ the ircd does; however, leave room for an ellipsis
+ and the kicker's nick. */
+ sprintf(reason + (TOPICLEN - (NICKLEN + 6)), "...");
+ }
}
|