1
0
mirror of https://github.com/anope/anope.git synced 2026-07-06 16:33:14 +02:00

Revert oper protection patch from SciFi, it breaks things. This reverts commit fee057ae11daea45295744f0e9e13f1d0ce0f2b4.

Conflicts:

	TODO

git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2004 5417fbe8-f217-4b02-8779-1006273d7864
This commit is contained in:
rburchell
2009-02-11 00:20:17 +00:00
parent 429da2b886
commit f4cdea8348
4 changed files with 6 additions and 49 deletions
+1 -7
View File
@@ -47,13 +47,7 @@ Legend:
[-] Command parser cleanup: mod_current_buffer needs to go away and be replaced by a proper parser. Commands should then indicate how they want the buffer split.
[ ] Fix permanent channels support properly. This will require removing do_sjoin().
[ ] Make NS ENFORCE/RELEASE stuff more sane, redo timers
[x] Add support for +k, +q, etc type umodes
Remaining issues:
? [ ] Also deny kills with usermode +q at Unreal, bearing in mind that AKILL on yourself is prevented that way.
? [ ] Add a force parameter to SendSVSKill/SendKick.
[ ] No check at modechange yet, maybe it's better to define in what circumstances it shall block, first.
[ ] Check whether there is a similar usermode in other IRCds and add them to the refering protocol.
[ ] Check for blocked KICK in e.g /cs kick.
[ ] Add support for +k, +q, etc type umodes
[x] Support operoverride and such things (stop reversing mode changes from nonopped people where unnecessary) - done by Liber
1.9.2
+4 -25
View File
@@ -1309,24 +1309,14 @@ private:
virtual void SendTopic(BotInfo *, const char *, const char *, const char *, time_t) = 0;
virtual void SendVhostDel(User *) { }
virtual void SendAkill(const char *, const char *, const char *, time_t, time_t, const char *) = 0;
virtual bool CanSVSKill(const char *source, const char *user, const char *buf)
{
return true;
}
virtual bool SendSVSKill(const char *source, const char *user, const char *fmt, ...)
virtual void SendSVSKill(const char *source, const char *user, const char *fmt, ...)
{
va_list args;
char buf[BUFSIZE] = "";
va_start(args, fmt);
vsnprintf(buf, BUFSIZE - 1, fmt, args);
va_end(args);
if (CanSVSKill(source, user, buf))
{
SendSVSKillInternal(source, user, buf);
}
return false;
SendSVSKillInternal(source, user, buf);
}
virtual void SendSVSMode(User *, int, const char **) = 0;
virtual void SendMode(BotInfo *bi, const char *dest, const char *fmt, ...)
@@ -1339,25 +1329,14 @@ private:
SendModeInternal(bi, dest, buf);
}
virtual void SendClientIntroduction(const char *, const char *, const char *, const char *, const char *, const char *uid) = 0;
virtual bool CanKick(BotInfo *bi, const char *chan, const char *user, const char *buf)
{
return true;
}
virtual bool SendKick(BotInfo *bi, const char *chan, const char *user, const char *fmt, ...)
virtual void SendKick(BotInfo *bi, const char *chan, const char *user, const char *fmt, ...)
{
va_list args;
char buf[BUFSIZE] = "";
va_start(args, fmt);
vsnprintf(buf, BUFSIZE - 1, fmt, args);
va_end(args);
if (CanKick(bi, chan, user, buf))
{
SendKickInternal(bi, chan, user, buf);
return true;
}
return false;
SendKickInternal(bi, chan, user, buf);
}
virtual void SendNoticeChanops(BotInfo *bi, const char *dest, const char *fmt, ...)
{
+1 -12
View File
@@ -23,7 +23,6 @@
#define UMODE_r 0x00000010
#define UMODE_w 0x00000020
#define UMODE_A 0x00000040
#define UMODE_k 0x00000080
#define UMODE_g 0x80000000
#define UMODE_x 0x40000000
@@ -197,7 +196,7 @@ unsigned long umodes[128] = {
0, 0, 0, 0, 0,
0, UMODE_a, 0, 0, 0, 0, 0,
UMODE_g,
UMODE_h, UMODE_i, 0, UMODE_k, 0, 0, 0, UMODE_o,
UMODE_h, UMODE_i, 0, 0, 0, 0, 0, UMODE_o,
0,
0, UMODE_r, 0, 0, 0, 0, UMODE_w,
UMODE_x,
@@ -510,11 +509,6 @@ class InspIRCdProto : public IRCDProto
send_cmd(ServerName, "ADDLINE G %s@%s %s %ld %ld :%s", user, host, who, static_cast<long int>(when), static_cast<long int>(timeleft), reason);
}
void CanSVSKill(const char *source, const char *user, const char *buf)
{
return !user->mode & UMODE_k;
}
void SendSVSKillInternal(const char *source, const char *user, const char *buf)
{
BotInfo *bi = findbot(source);
@@ -549,11 +543,6 @@ class InspIRCdProto : public IRCDProto
send_cmd(ServerName, "UID %s %ld %s %s %s %s 0.0.0.0 %ld +%s :%s", uid, static_cast<long>(time(NULL)), nick, host, host, user, static_cast<long>(time(NULL)), modes, real);
}
bool CanKick(BotInfo *source, const char *chan, const char *user, const char *buf)
{
return !user->mode & UMODE_k;
}
void SendKickInternal(BotInfo *source, const char *chan, const char *user, const char *buf)
{
User *u = finduser(user);
-5
View File
@@ -663,11 +663,6 @@ class UnrealIRCdProto : public IRCDProto
SendSQLine(nick, "Reserved for services");
}
bool CanKick(BotInfo *source, const char *chan, const char *user, const char *buf)
{
return !user->mode & MODE_q;
}
void SendKickInternal(BotInfo *source, const char *chan, const char *user, const char *buf)
{
if (buf) send_cmd(source->nick, "H %s %s :%s", chan, user, buf);