Update of /cvsroot/srvx/services/src
In directory sc8-pr-cvs1:/tmp/cvs-serv14135/src
Modified Files:
opserv.c
Log Message:
make cmd_join work properly for non-OpServ bots
Index: opserv.c
===================================================================
RCS file: /cvsroot/srvx/services/src/opserv.c,v
retrieving revision 1.310
retrieving revision 1.311
diff -C2 -r1.310 -r1.311
*** opserv.c 8 Jun 2003 02:46:30 -0000 1.310
--- opserv.c 12 Jun 2003 10:56:11 -0000 1.311
***************
*** 935,938 ****
--- 935,940 ----
{
int announce_op;
+ struct userNode *bot = cmd->parent->bot;
+
OPSERV_MIN_PARMS(2, false);
if (!IsChannelName(argv[1])) {
***************
*** 941,945 ****
}
if ((channel = GetChannel(argv[1]))) {
! if (GetUserMode(channel, opserv)) {
reply(OSMSG_ALREADY_JOINED, channel->name);
return 0;
--- 943,947 ----
}
if ((channel = GetChannel(argv[1]))) {
! if (GetUserMode(channel, bot)) {
reply(OSMSG_ALREADY_JOINED, channel->name);
return 0;
***************
*** 950,956 ****
announce_op = 0;
}
! AddChannelUser(opserv, channel);
! AddChannelOp(1, &opserv, channel, opserv, announce_op);
! irc_fetchtopic(opserv, channel->name);
reply(OSMSG_JOIN_DONE, channel->name);
return 1;
--- 952,958 ----
announce_op = 0;
}
! AddChannelUser(bot, channel);
! AddChannelOp(1, &bot, channel, bot, announce_op);
! irc_fetchtopic(bot, channel->name);
reply(OSMSG_JOIN_DONE, channel->name);
return 1;
|