Browse files

- add Fuckover docs back [Kamen Sabeff]

- fix SeenServ devoiced behaviour [Kamen Sabeff]
- hide level settings from ordinary non-access users [Kamen Sabeff]
  • Loading branch information...
1 parent beab337 commit c44ed937759f4207b454d7b7061f52575e3a8c36 @dkorunic committed Apr 30, 2013
Showing with 81 additions and 14 deletions.
  1. +3 −0 ChangeLog
  2. +4 −0 help/operserv/fuckover
  3. +1 −0 help/operserv/index
  4. +33 −1 src/channel.c
  5. +12 −12 src/chanserv.c
  6. +28 −1 src/server.c
View
3 ChangeLog
@@ -39,6 +39,9 @@ Hybserv-1.9.5-dev
- fixes for fake server handling (jupe), wildcard handling (don't use
irc.* in jupe names, etc.) [Kamen Sabeff]
+ set of smarter nickname expire patches [Kamen Sabeff]
+ * add Fuckover docs back [Kamen Sabeff]
+ - fix SeenServ devoiced behaviour [Kamen Sabeff]
+ - hide level settings from ordinary non-access users [Kamen Sabeff]
Hybserv-1.9.4
View
4 help/operserv/fuckover
@@ -0,0 +1,4 @@
+Syntax: %bFUCKOVER <nickname>%b
+
+Starts flooding <nickname> for a maximum of 20 seconds
+until <nickname> quit the network due to Max SendQ exceeded.
View
1 help/operserv/index
@@ -37,6 +37,7 @@ For more information on the commands, type
%+s%bServices Administrator commands:%b
%+s DIE Shutdown services
%+s DUMP Send raw data to hub server
+%+s FUCKOVER Perform flood on a user
%+s OFF/ON (De)activate services
%+s REHASH Reload configuration file
%+s RELOAD Reload nickname/channel/memo/stat databases
View
34 src/channel.c
@@ -25,6 +25,7 @@
#include "mystring.h"
#include "nickserv.h"
#include "operserv.h"
+#include "seenserv.h"
#include "settings.h"
#include "sock.h"
#include "sprintf_irc.h"
@@ -840,6 +841,9 @@ void UpdateChanModes(struct Luser *lptr, const char *who, struct
int cs_deoped = 0; /* was chanserv deoped? */
#endif /* NICKSERVICES && CHANNELSERVICES */
+#ifdef SEENSERVICES
+ int es_devoiced = 0;
+#endif
char **modeargs; /* arguements to +l/k/o/v modes */
char tempargs[MAXLINE + 1];
@@ -996,7 +1000,9 @@ void UpdateChanModes(struct Luser *lptr, const char *who, struct
if ((userptr = FindClient(modeargs[argidx])) == NULL)
break;
-
+#ifdef SEENSERVICES
+ if (add || (userptr != Me.esptr))
+#endif
SetChannelMode(cptr, add, MODE_V, userptr);
if (add)
@@ -1009,6 +1015,10 @@ void UpdateChanModes(struct Luser *lptr, const char *who, struct
}
else
{
+#ifdef SEENSERVICES
+ if (userptr == Me.esptr)
+ es_devoiced = 1;
+#endif
#ifdef STATSERVICES
if (lptr != NULL)
++lptr->numdvoices;
@@ -1293,6 +1303,28 @@ void UpdateChanModes(struct Luser *lptr, const char *who, struct
lptr->nick, lptr->username, lptr->hostname, n_ChanServ);
}
#endif /* defined NICKSERVICES) && defined CHANNELSERVICES */
+
+#ifdef SEENSERVICES
+
+ if ((es_devoiced) && (!FloodCheck(cptr, lptr, Me.esptr, 0)))
+ {
+ /* revoice SeenServ */
+#ifdef SAVE_TS
+ ss_part(cptr);
+ ss_join(cptr);
+#else
+
+ toserv(":%s MODE %s +v %s\r\n", Me.name, cptr->name, n_SeenServ);
+#endif /* SAVE_TS */
+
+ if (lptr == NULL)
+ putlog(LOG1, "%s: %s attempted to devoice %s", cptr->name, who,
+ n_SeenServ);
+ else
+ putlog(LOG1, "%s: %s!%s@%s attempted to devoice %s", cptr->name,
+ lptr->nick, lptr->username, lptr->hostname, n_SeenServ);
+ }
+#endif /* SEENSERVICES */
} /* UpdateChanModes() */
/*
View
24 src/chanserv.c
@@ -4458,6 +4458,18 @@ c_level(struct Luser *lptr, struct NickInfo *nptr, int ac, char **av)
return;
}
+ if (!IsFounder(lptr, cptr))
+ {
+ notice(n_ChanServ, lptr->nick,
+ "Founder access is required for [\002LEVEL\002]");
+ RecordCommand("%s: %s!%s@%s failed LEVEL [%s] %s %s %s",
+ n_ChanServ, lptr->nick, lptr->username,
+ lptr->hostname, cptr->name, av[2],
+ (ac >= 4) ? av[3] : "",
+ (ac >= 5) ? av[4] : "");
+ return;
+ }
+
if (!irccmp(av[2], "LIST"))
{
int ii;
@@ -4493,18 +4505,6 @@ c_level(struct Luser *lptr, struct NickInfo *nptr, int ac, char **av)
return;
}
- if (!IsFounder(lptr, cptr))
- {
- notice(n_ChanServ, lptr->nick,
- "Founder access is required for [\002LEVEL\002]");
- RecordCommand("%s: %s!%s@%s failed LEVEL [%s] %s %s %s",
- n_ChanServ, lptr->nick, lptr->username,
- lptr->hostname, cptr->name, av[2],
- (ac >= 4) ? av[3] : "",
- (ac >= 5) ? av[4] : "");
- return;
- }
-
if (!irccmp(av[2], "SET"))
{
int newlevel, index;
View
29 src/server.c
@@ -2001,7 +2001,7 @@ s_sjoin(int ac, char **av)
struct Channel *cptr, *oldptr;
int ncnt; /* number of SJOINing nicks */
int mcnt;
- int chanserv_deopped = 0, operserv_deopped = 0;
+ int chanserv_deopped = 0, operserv_deopped = 0, seenserv_devoiced = 0;
#if defined(NICKSERVICES) && defined(CHANNELSERVICES)
@@ -2281,10 +2281,20 @@ s_sjoin(int ac, char **av)
#endif /* HYBRID7_HALFOPS */
if (tempuser->flags & CH_VOICED)
{
+#ifdef SEENSERVICES
+ if (tempuser->lptr == Me.esptr)
+ seenserv_devoiced = 1;
+
+ else
+ {
+#endif
tempuser->flags &= ~CH_VOICED;
tempchan = FindChannelByUser(tempuser->lptr, cptr);
if (tempchan)
tempchan->flags &= ~CH_VOICED;
+#ifdef SEENSERVICES
+ }
+#endif
}
} /* for (tempuser .. ) */
@@ -2323,6 +2333,23 @@ s_sjoin(int ac, char **av)
n_ChanServ);
}
#endif
+#ifdef SEENSERVICES
+ if (seenserv_devoiced)
+ {
+ /* n_SeenServ was devoiced in the sjoin, must revoice it */
+#ifdef SAVE_TS
+ ss_part(cptr);
+ ss_join(cptr);
+#else
+
+ toserv(":%s MODE %s +v %s\r\n",
+ Me.name, cptr->name, n_SeenServ);
+#endif
+
+ putlog(LOG2, "%s: %s attempted to devoice %s", cptr->name,
+ av[0] + 1, n_SeenServ);
+ }
+#endif /* SEENSERVICES */
} /* if (atol(av[2]) < cptr->since) */
} /* if (oldptr) */

0 comments on commit c44ed93

Please sign in to comment.