[X2serv-cvs] [CVS] Module x2: Change committed
Brought to you by:
sirvulcan
From: Alex S. <ru...@us...> - 2004-07-04 18:18:41
|
Committer : Alex Schumann <ru...@us...> CVSROOT : /cvsroot/x2serv Module : x2 Commit time: 2004-07-04 17:03:20 UTC Modified files: source/send.c source/send.h source/server.c Log message: Passing char to %s causes core files - go figure ;) CheckGline() updated to handle double-char numerics and not to crash.. ---------------------- diff included ---------------------- Index: x2/source/send.c diff -u x2/source/send.c:1.39 x2/source/send.c:1.40 --- x2/source/send.c:1.39 Mon Jun 28 14:46:23 2004 +++ x2/source/send.c Sun Jul 4 10:03:09 2004 @@ -223,7 +223,7 @@ send_command_from_server("GL * +%s %lu :%s", mask, duration, buff); } -void send_gline_to_server(char num, char *mask, time_t duration, char *format, ...) +void send_gline_to_server(char num1, char num2, char *mask, time_t duration, char *format, ...) { va_list args; char buff[LINEBUFFSIZE]; @@ -232,7 +232,7 @@ vsprintf(buff, format, args); va_end(args); - send_command_from_server("GL %s +%s %lu :%s", num, mask, duration, buff); + send_command_from_server("GL %c%c +%s %lu :%s", num1, num2, mask, duration, buff); } void send_ungline(char *mask) Index: x2/source/send.h diff -u x2/source/send.h:1.12 x2/source/send.h:1.13 --- x2/source/send.h:1.12 Mon Feb 4 01:55:46 2002 +++ x2/source/send.h Sun Jul 4 10:03:09 2004 @@ -18,7 +18,7 @@ void send_wallchops(ChannelListType cptr, char *format, ...); void send_kill(UserListType uptr, char *format, ...); void send_gline(char *mask, time_t duration, char *format, ...); -void send_gline_to_server(char num, char *mask, time_t duration, char *format, ...); +void send_gline_to_server(char num1, char num2, char *mask, time_t duration, char *format, ...); void send_ungline(char *mask); void send_settime(time_t thetime); void send_opchan(ChannelListType cptr); Index: x2/source/server.c diff -u x2/source/server.c:1.23 x2/source/server.c:1.24 --- x2/source/server.c:1.23 Wed Jun 9 16:40:31 2004 +++ x2/source/server.c Sun Jul 4 10:03:09 2004 @@ -83,7 +83,7 @@ { if(!matches(gptr->address, uhr) && gptr->time > NetTime()) { - send_gline_to_server(UserPtr->Numnick[0], gptr->address, gptr->time - NetTime(), "%s", gptr->reason); + send_gline_to_server(UserPtr->Numnick[0],UserPtr->Numnick[1], gptr->address, gptr->time - NetTime(), "%s", gptr->reason); return(TRUE); } gptr = gptr->Next; ----------------------- End of diff ----------------------- |