- irc_kill(chanserv, user, "BANG - Don't stuff bullets into a loaded gun");
+ DelUser(user, chanserv, 1, "BANG - Don't stuff bullets into a loaded gun");
if (cData->roulette_chamber == 0) {
reply("CSMSG_ROULETTE_BANG");
reply("CSMSG_ROULETTE_BETTER_LUCK", user->nick);
if (cData->roulette_chamber == 0) {
reply("CSMSG_ROULETTE_BANG");
reply("CSMSG_ROULETTE_BETTER_LUCK", user->nick);
- struct userNode *remnick = data;
+ char *remnick = data;
+ struct userNode *user;
+ /* sometimes the clone was killed and maybe even the user took their nick back
+ * (ie, an oper) so dont kill them here after all unless they are local. */
+ if( (user = GetUserH(remnick)) )
+ if(IsLocal(user) )
+ DelUser(user, NULL, 1, "");
+}
+
+int lamepart(struct userNode *nick) {
+ struct modeNode *mn;
+ unsigned int count, n;
+
+ for (n=count=0; n<nick->channels.used; n++) {
+ mn = nick->channels.list[n];
+ irc_svspart(chanserv, nick, mn->channel);
+ }
int wheel = 1 + rand() % 12;
send_target_message(1, channel->name, chanserv, "CSMSG_SPIN_WHEEL1", user->nick);
int wheel = 1 + rand() % 12;
send_target_message(1, channel->name, chanserv, "CSMSG_SPIN_WHEEL1", user->nick);
if (wheel == 1) {
send_target_message(1, channel->name, chanserv, "CSMSG_SPIN_1");
if (wheel == 1) {
send_target_message(1, channel->name, chanserv, "CSMSG_SPIN_1");
- irc_kill(chanserv, user, "Connection reset by peer");
+ if (type < 7)
+ irc_kill(chanserv, user, "Connection reset by peer");
+ else
+ sputsock("%s SQ %s :Connection reset by peer", self->numeric, user->numeric);
}
if (wheel == 2) {
send_target_message(1, channel->name, chanserv, "CSMSG_SPIN_2");
}
if (wheel == 2) {
send_target_message(1, channel->name, chanserv, "CSMSG_SPIN_2");
- sputsock("%s SJ %s 0 "FMT_TIME_T, self->numeric, user->numeric, now);
+ if (lamep)
+ lamepart(user);
+ else
+ sputsock("%s SJ %s 0 "FMT_TIME_T, self->numeric, user->numeric, now);
}
if (wheel == 3) {
send_target_message(1, channel->name, chanserv, "CSMSG_SPIN_3");
}
if (wheel == 3) {
send_target_message(1, channel->name, chanserv, "CSMSG_SPIN_3");
- sputsock("%s SJ %s 0 "FMT_TIME_T, self->numeric, user->numeric, now);
+ if (lamep)
+ lamepart(user);
+ else
+ sputsock("%s SJ %s 0 "FMT_TIME_T, self->numeric, user->numeric, now);
- sputsock("%s SJ %s 0 "FMT_TIME_T, self->numeric, user->numeric, now);
+ if (lamep)
+ lamepart(user);
+ else
+ sputsock("%s SJ %s 0 "FMT_TIME_T, self->numeric, user->numeric, now);
- sputsock("%s SJ %s 0 "FMT_TIME_T, self->numeric, user->numeric, now);
- complete = 1;
+ if (lamep)
+ lamepart(user);
+ else
+ sputsock("%s SJ %s 0 "FMT_TIME_T, self->numeric, user->numeric, now);
+ complete = 1;
irc_svsnick(chanserv, user, abusednick);
clone = AddClone(oldnick, oldident, oldhost, "I got abused by the wheel of misfortune :D");
irc_svsnick(chanserv, user, abusednick);
clone = AddClone(oldnick, oldident, oldhost, "I got abused by the wheel of misfortune :D");
}
if (wheel == 11) {
send_target_message(1, channel->name, chanserv, "CSMSG_SPIN_11");
}
if (wheel == 11) {
send_target_message(1, channel->name, chanserv, "CSMSG_SPIN_11");
CS_LOG = log_register_type("ChanServ", "file:chanserv.log");
conf_register_reload(chanserv_conf_read);
CS_LOG = log_register_type("ChanServ", "file:chanserv.log");
conf_register_reload(chanserv_conf_read);
DEFINE_COMMAND(reply, 1, 0, "flags", "+nolog,+toy,+acceptchan", NULL);
DEFINE_COMMAND(roulette, 1, 0, "flags", "+nolog,+toy,+acceptchan", NULL);
DEFINE_COMMAND(shoot, 1, 0, "flags", "+nolog,+toy,+acceptchan", NULL);
DEFINE_COMMAND(reply, 1, 0, "flags", "+nolog,+toy,+acceptchan", NULL);
DEFINE_COMMAND(roulette, 1, 0, "flags", "+nolog,+toy,+acceptchan", NULL);
DEFINE_COMMAND(shoot, 1, 0, "flags", "+nolog,+toy,+acceptchan", NULL);
-
- if (type > 6)
- DEFINE_COMMAND(spin, 1, 0, "spin", "+nolog,+toy,+acceptchan", NULL);
+ DEFINE_COMMAND(spin, 1, MODCMD_REQUIRE_AUTHED, "spin", "+nolog,+toy,+acceptchan", NULL);