Update of /cvsroot/srvx/services/src
In directory usw-pr-cvs1:/tmp/cvs-serv19708
Modified Files:
Tag: rel-1_0
chanserv.c
Log Message:
dont crash if the channel param isnt actually registered in toys (oops :)
Index: chanserv.c
===================================================================
RCS file: /cvsroot/srvx/services/src/chanserv.c,v
retrieving revision 1.161.2.78
retrieving revision 1.161.2.79
diff -C2 -r1.161.2.78 -r1.161.2.79
*** chanserv.c 2001/08/19 00:43:58 1.161.2.78
--- chanserv.c 2001/08/21 04:49:19 1.161.2.79
***************
*** 4281,4285 ****
(void)argc; (void)argv;
! if (channel && channel->channel_info->options[optToys] == 'd') {
chanserv_notice(user, CSMSG_TOYS_DISABLED, channel->name);
return 1;
--- 4281,4285 ----
(void)argc; (void)argv;
! if (channel && channel->channel_info && channel->channel_info->options[optToys] == 'd') {
chanserv_notice(user, CSMSG_TOYS_DISABLED, channel->name);
return 1;
***************
*** 4306,4310 ****
(void)argc; (void)argv;
! if (channel && channel->channel_info->options[optToys] == 'd' && !IsPrivileged(user)) {
chanserv_notice(user, CSMSG_TOYS_DISABLED, channel->name);
return 1;
--- 4306,4310 ----
(void)argc; (void)argv;
! if (channel && channel->channel_info && channel->channel_info->options[optToys] == 'd' && !IsPrivileged(user)) {
chanserv_notice(user, CSMSG_TOYS_DISABLED, channel->name);
return 1;
***************
*** 4331,4335 ****
(void)argc; (void)argv;
! if (channel && channel->channel_info->options[optToys] == 'd') {
chanserv_notice(user, CSMSG_TOYS_DISABLED, channel->name);
return 1;
--- 4331,4335 ----
(void)argc; (void)argv;
! if (channel && channel->channel_info && channel->channel_info->options[optToys] == 'd') {
chanserv_notice(user, CSMSG_TOYS_DISABLED, channel->name);
return 1;
***************
*** 4367,4371 ****
/* since the switch() statement only affects users on the userlist
we've got to stop before it even gets there. */
! if (channel && channel->channel_info->options[optToys] == 'd') {
chanserv_notice(user, CSMSG_TOYS_DISABLED, channel->name);
return 1;
--- 4367,4371 ----
/* since the switch() statement only affects users on the userlist
we've got to stop before it even gets there. */
! if (channel && channel->channel_info && channel->channel_info->options[optToys] == 'd') {
chanserv_notice(user, CSMSG_TOYS_DISABLED, channel->name);
return 1;
***************
*** 4373,4377 ****
resp = chanserv_conf.eightball->list[accum % chanserv_conf.eightball->used];
! if (channel && !argv[-1] && GetChannelUser(channel->channel_info, user->handle_info)) {
char *response;
response = alloca(strlen(user->nick)+strlen(resp)+5);
--- 4373,4377 ----
resp = chanserv_conf.eightball->list[accum % chanserv_conf.eightball->used];
! if (channel->channel_info && !argv[-1] && GetChannelUser(channel->channel_info, user->handle_info)) {
char *response;
response = alloca(strlen(user->nick)+strlen(resp)+5);
***************
*** 4395,4399 ****
sides = atoi(argv[1]);
! if (channel && channel->channel_info->options[optToys] == 'd') {
chanserv_notice(user, CSMSG_TOYS_DISABLED, channel->name);
return 1;
--- 4395,4399 ----
sides = atoi(argv[1]);
! if (channel && channel->channel_info && channel->channel_info->options[optToys] == 'd') {
chanserv_notice(user, CSMSG_TOYS_DISABLED, channel->name);
return 1;
|