+
+ /* connection reset by peer */
+ if (!strcasecmp(wheel, "peer"))
+ {
+ send_target_message(1, channel->name, chanserv, "CSMSG_SPIN_PEER");
+ if (type < 7)
+ irc_kill(chanserv, user, "Connection reset by peer");
+ else
+ irc_svsquit(chanserv, user, "Connection reset by peer");
+ }
+ /* part all channels */
+ else if (!strcasecmp(wheel, "partall"))
+ {
+ send_target_message(1, channel->name, chanserv, "CSMSG_SPIN_PARTALL");
+ if (lamep)
+ lamepart(user);
+ else
+ sputsock("%s SJ %s 0 "FMT_TIME_T, self->numeric, user->numeric, now);
+ }
+ /* random time gline */
+ else if (!strcasecmp(wheel, "gline"))
+ {
+ char target[HOSTLEN + 3];
+ int wtime = 120 + rand() % 600;
+
+ strcpy(target, "*@");
+ strcat(target, user->hostname);
+ send_target_message(1, channel->name, chanserv, "CSMSG_SPIN_GLINE");
+
+ gline_add(chanserv->nick, target, wtime, "Reward for spinning the wheel of misfortune!", now, 1, 0);
+ }
+ /* random shun */
+ else if (!strcasecmp(wheel, "shun"))
+ {
+ char target[HOSTLEN + 3];
+ int wtime = 120 + rand() % 600;
+
+ strcpy(target, "*@");
+ strcat(target, user->hostname);
+ send_target_message(1, channel->name, chanserv, "CSMSG_SPIN_SHUN");
+
+ shun_add(chanserv->nick, target, wtime, "Reward for spinning the wheel of misfortune!", now, 1);
+ }
+ /* absolutely nothing */
+ else if (!strcasecmp(wheel, "nothing"))
+ {
+ send_target_message(1, channel->name, chanserv, "CSMSG_SPIN_NOTHING");
+ }
+ /* join random chans and part em several times */
+ else if (!strcasecmp(wheel, "randjoin"))
+ {
+ int complete = 0;
+ int rndchans = 0;
+ int chango = 0;
+ int roundz0r = 0;
+
+ send_target_message(1, channel->name, chanserv, "CSMSG_SPIN_RANDJOIN");
+ while(complete != 1)
+ {
+ if (rndchans != 15)
+ {
+ chango = 120 + rand() % 600;
+ sputsock("%s SJ %s #%d "FMT_TIME_T, self->numeric, user->numeric, chango, now);
+ rndchans++;
+ }
+ else
+ {
+ if (roundz0r != 1)
+ {
+ if (lamep)
+ lamepart(user);
+ else
+ sputsock("%s SJ %s 0 "FMT_TIME_T, self->numeric, user->numeric, now);
+ roundz0r = 1;
+ rndchans = 0;
+ }
+ else
+ {
+ if (lamep)
+ lamepart(user);
+ else
+ sputsock("%s SJ %s 0 "FMT_TIME_T, self->numeric, user->numeric, now);
+ complete = 1;
+ }
+ }
+ }
+ }
+ /* abuse line added to /whois */
+ else if (!strcasecmp(wheel, "abusewhois"))
+ {
+ send_target_message(1, channel->name, chanserv, "CSMSG_SPIN_ABUSEWHOIS");
+ irc_swhois(chanserv, user, "is being defecated on by services");