[srvx-commits] CVS: services/src opserv.c,1.187.2.40,1.187.2.41
Brought to you by:
entrope
From: Entrope <en...@us...> - 2001-08-10 22:21:36
|
Update of /cvsroot/srvx/services/src In directory usw-pr-cvs1:/tmp/cvs-serv27460/src Modified Files: Tag: rel-1_0 opserv.c Log Message: check the right guy's number of channels before deciding to send opserv_ison to a user also be a little more paranoid about how much data to write to buff in opserv_ison Index: opserv.c =================================================================== RCS file: /cvsroot/srvx/services/src/opserv.c,v retrieving revision 1.187.2.40 retrieving revision 1.187.2.41 diff -C2 -r1.187.2.40 -r1.187.2.41 *** opserv.c 2001/08/08 00:45:54 1.187.2.40 --- opserv.c 2001/08/10 22:21:32 1.187.2.41 *************** *** 929,937 **** mn = target->channels.list[n]; here_len = strlen(mn->channel->name); ! if (count + here_len + 2 > sizeof(buff)) { buff[count] = 0; opserv_notice(tell, "%s", buff); ! count = 1; ! buff[0] = ' '; } buff[count++] = ' '; --- 929,936 ---- mn = target->channels.list[n]; here_len = strlen(mn->channel->name); ! if ((count + here_len + 4) > sizeof(buff)) { buff[count] = 0; opserv_notice(tell, "%s", buff); ! count = 0; } buff[count++] = ' '; *************** *** 1276,1280 **** opserv_notice(user, OSMSG_WHOIS_NUMERIC, target->numeric); opserv_notice(user, OSMSG_WHOIS_SERVER, target->uplink->name); ! if (user->channels.used <= MAX_CHANNELS_WHOIS) { opserv_ison(user, target, OSMSG_WHOIS_CHANNELS); } else { --- 1275,1279 ---- opserv_notice(user, OSMSG_WHOIS_NUMERIC, target->numeric); opserv_notice(user, OSMSG_WHOIS_SERVER, target->uplink->name); ! if (target->channels.used <= MAX_CHANNELS_WHOIS) { opserv_ison(user, target, OSMSG_WHOIS_CHANNELS); } else { |