mirror of
https://github.com/anope/anope.git
synced 2026-07-01 14:46:39 +02:00
BUILD : 1.7.8 (758) BUGS : 332 NOTES : FIXED: anope_event_away() doing dangerous things with ac/av, viagra had issues in notice_ops, anope_cmd_mode() used wrongly for dreamforge and ultimate2
git-svn-id: svn://svn.anope.org/anope/trunk@758 31f1291d-b8d6-0310-a050-a5561fc1590b git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@520 5417fbe8-f217-4b02-8779-1006273d7864
This commit is contained in:
parent
7a1d87fd7b
commit
22bf8b43b8
@@ -24,6 +24,8 @@ Provided by Anope Dev. <dev@anope.org> - 2005
|
||||
02/13 A Internal Event support, see EVENTS in the doc folder for help [ #00]
|
||||
02/05 A Support for Unreal 3.2 +I channel mode. [ #00]
|
||||
02/03 A Merged anope-win32 branch into the main, now Win32 ready. [ #00]
|
||||
05/03 F Wrong variable checking in anope_event_away(). [ #00]
|
||||
05/02 F Wrong use of anope_cmd_mode() for dreamforge and ultimate2. [#332]
|
||||
05/02 F Usermode +R instead of +Z used for services roots with Ultimate3. [#361]
|
||||
05/02 F Getting op if you had access to protect and not op on a channel. [#355]
|
||||
05/01 F Typo in include/extern.h with restore_unsynced_topics. [#354]
|
||||
|
||||
+11
-11
@@ -155,11 +155,15 @@ void bahamut_set_umode(User * user, int ac, char **av)
|
||||
|
||||
while (*modes) {
|
||||
|
||||
add ? (user->mode |= umodes[(int) *modes]) : (user->mode &=
|
||||
~umodes[(int)
|
||||
*modes]);
|
||||
|
||||
switch (*modes++) {
|
||||
/* This looks better, much better than "add ? (do_add) : (do_remove)".
|
||||
* At least this is readable without paying much attention :) -GD
|
||||
*/
|
||||
if (add)
|
||||
user->mode |= umodes[(int) *modes];
|
||||
else
|
||||
user->mode &= ~umodes[(int) *modes];
|
||||
|
||||
switch (*modes++) {
|
||||
case '+':
|
||||
add = 1;
|
||||
break;
|
||||
@@ -1276,15 +1280,11 @@ void bahamut_cmd_quit(char *source, char *buf)
|
||||
|
||||
int anope_event_away(char *source, int ac, char **av)
|
||||
{
|
||||
if (ac) {
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
if (!source) {
|
||||
return MOD_CONT;
|
||||
}
|
||||
m_away(source, av[0]);
|
||||
return MOD_CONT;
|
||||
m_away(source, (ac ? av[0] : NULL));
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
int anope_event_ping(char *source, int ac, char **av)
|
||||
|
||||
+11
-11
@@ -152,9 +152,13 @@ void dreamforge_set_umode(User * user, int ac, char **av)
|
||||
|
||||
while (*modes) {
|
||||
|
||||
add ? (user->mode |= umodes[(int) *modes]) : (user->mode &=
|
||||
~umodes[(int)
|
||||
*modes]);
|
||||
/* This looks better, much better than "add ? (do_add) : (do_remove)".
|
||||
* At least this is readable without paying much attention :) -GD
|
||||
*/
|
||||
if (add)
|
||||
user->mode |= umodes[(int) *modes];
|
||||
else
|
||||
user->mode &= ~umodes[(int) *modes];
|
||||
|
||||
switch (*modes++) {
|
||||
case '+':
|
||||
@@ -648,15 +652,11 @@ void dreamforge_cmd_global(char *source, char *buf)
|
||||
|
||||
int anope_event_away(char *source, int ac, char **av)
|
||||
{
|
||||
if (ac) {
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
if (!source) {
|
||||
return MOD_CONT;
|
||||
}
|
||||
m_away(source, av[0]);
|
||||
return MOD_CONT;
|
||||
m_away(source, (ac ? av[0] : NULL));
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
int anope_event_topic(char *source, int ac, char **av)
|
||||
@@ -1041,7 +1041,7 @@ void dreamforge_cmd_bot_nick(char *nick, char *user, char *host,
|
||||
EnforceQlinedNick(nick, s_BotServ);
|
||||
send_cmd(NULL, "NICK %s 1 %ld %s %s %s 0 :%s", nick,
|
||||
(long int) time(NULL), user, host, ServerName, real);
|
||||
anope_cmd_mode(nick, "MODE %s %s", nick, modes);
|
||||
anope_cmd_mode(nick, nick, "MODE %s", modes);
|
||||
dreamforge_cmd_sqline(nick, "Reserved for services");
|
||||
}
|
||||
|
||||
@@ -1095,7 +1095,7 @@ void dreamforge_cmd_guest_nick(char *nick, char *user, char *host,
|
||||
{
|
||||
send_cmd(NULL, "NICK %s 1 %ld %s %s %s 0 :%s", nick,
|
||||
(long int) time(NULL), user, host, ServerName, real);
|
||||
anope_cmd_mode(nick, "MODE %s %s", nick, modes);
|
||||
anope_cmd_mode(nick, nick, "MODE %s", modes);
|
||||
}
|
||||
|
||||
void dreamforge_cmd_svso(char *source, char *nick, char *flag)
|
||||
|
||||
@@ -154,9 +154,13 @@ void hybrid_set_umode(User * user, int ac, char **av)
|
||||
|
||||
while (*modes) {
|
||||
|
||||
add ? (user->mode |= umodes[(int) *modes]) : (user->mode &=
|
||||
~umodes[(int)
|
||||
*modes]);
|
||||
/* This looks better, much better than "add ? (do_add) : (do_remove)".
|
||||
* At least this is readable without paying much attention :) -GD
|
||||
*/
|
||||
if (add)
|
||||
user->mode |= umodes[(int) *modes];
|
||||
else
|
||||
user->mode &= ~umodes[(int) *modes];
|
||||
|
||||
switch (*modes++) {
|
||||
case '+':
|
||||
@@ -843,15 +847,11 @@ int anope_event_ping(char *source, int ac, char **av)
|
||||
|
||||
int anope_event_away(char *source, int ac, char **av)
|
||||
{
|
||||
if (ac) {
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
if (!source) {
|
||||
return MOD_CONT;
|
||||
}
|
||||
m_away(source, av[0]);
|
||||
return MOD_CONT;
|
||||
m_away(source, (ac ? av[0] : NULL));
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
int anope_event_kill(char *source, int ac, char **av)
|
||||
|
||||
@@ -383,9 +383,13 @@ void inspircd_set_umode(User * user, int ac, char **av)
|
||||
|
||||
while (*modes) {
|
||||
|
||||
add ? (user->mode |= umodes[(int) *modes]) : (user->mode &=
|
||||
~umodes[(int)
|
||||
*modes]);
|
||||
/* This looks better, much better than "add ? (do_add) : (do_remove)".
|
||||
* At least this is readable without paying much attention :) -GD
|
||||
*/
|
||||
if (add)
|
||||
user->mode |= umodes[(int) *modes];
|
||||
else
|
||||
user->mode &= ~umodes[(int) *modes];
|
||||
|
||||
switch (*modes++) {
|
||||
case '+':
|
||||
|
||||
@@ -154,9 +154,13 @@ void plexus_set_umode(User * user, int ac, char **av)
|
||||
|
||||
while (*modes) {
|
||||
|
||||
add ? (user->mode |= umodes[(int) *modes]) : (user->mode &=
|
||||
~umodes[(int)
|
||||
*modes]);
|
||||
/* This looks better, much better than "add ? (do_add) : (do_remove)".
|
||||
* At least this is readable without paying much attention :) -GD
|
||||
*/
|
||||
if (add)
|
||||
user->mode |= umodes[(int) *modes];
|
||||
else
|
||||
user->mode &= ~umodes[(int) *modes];
|
||||
|
||||
switch (*modes++) {
|
||||
case '+':
|
||||
@@ -926,15 +930,11 @@ int anope_event_ping(char *source, int ac, char **av)
|
||||
|
||||
int anope_event_away(char *source, int ac, char **av)
|
||||
{
|
||||
if (ac) {
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
if (!source) {
|
||||
return MOD_CONT;
|
||||
}
|
||||
m_away(source, av[0]);
|
||||
return MOD_CONT;
|
||||
m_away(source, (ac ? av[0] : NULL));
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
int anope_event_kill(char *source, int ac, char **av)
|
||||
|
||||
+11
-11
@@ -1232,11 +1232,15 @@ void ptlink_set_umode(User * user, int ac, char **av)
|
||||
|
||||
while (*modes) {
|
||||
|
||||
add ? (user->mode |= umodes[(int) *modes]) : (user->mode &=
|
||||
~umodes[(int)
|
||||
*modes]);
|
||||
|
||||
switch (*modes++) {
|
||||
/* This looks better, much better than "add ? (do_add) : (do_remove)".
|
||||
* At least this is readable without paying much attention :) -GD
|
||||
*/
|
||||
if (add)
|
||||
user->mode |= umodes[(int) *modes];
|
||||
else
|
||||
user->mode &= ~umodes[(int) *modes];
|
||||
|
||||
switch (*modes++) {
|
||||
case '+':
|
||||
add = 1;
|
||||
break;
|
||||
@@ -1281,15 +1285,11 @@ int anope_event_ping(char *source, int ac, char **av)
|
||||
|
||||
int anope_event_away(char *source, int ac, char **av)
|
||||
{
|
||||
if (ac) {
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
if (!source) {
|
||||
return MOD_CONT;
|
||||
}
|
||||
m_away(source, av[0]);
|
||||
return MOD_CONT;
|
||||
m_away(source, (ac ? av[0] : NULL));
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
void ptlink_cmd_bot_nick(char *nick, char *user, char *host, char *real,
|
||||
|
||||
@@ -790,9 +790,13 @@ void rageircd_set_umode(User * user, int ac, char **av)
|
||||
|
||||
while (*modes) {
|
||||
|
||||
add ? (user->mode |= umodes[(int) *modes]) : (user->mode &=
|
||||
~umodes[(int)
|
||||
*modes]);
|
||||
/* This looks better, much better than "add ? (do_add) : (do_remove)".
|
||||
* At least this is readable without paying much attention :) -GD
|
||||
*/
|
||||
if (add)
|
||||
user->mode |= umodes[(int) *modes];
|
||||
else
|
||||
user->mode &= ~umodes[(int) *modes];
|
||||
|
||||
switch (*modes++) {
|
||||
case '+':
|
||||
@@ -906,15 +910,11 @@ void rageircd_cmd_serv_privmsg(char *source, char *dest, char *msg)
|
||||
|
||||
int anope_event_away(char *source, int ac, char **av)
|
||||
{
|
||||
if (ac) {
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
if (!source) {
|
||||
return MOD_CONT;
|
||||
}
|
||||
m_away(source, av[0]);
|
||||
return MOD_CONT;
|
||||
m_away(source, (ac ? av[0] : NULL));
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
int anope_event_ping(char *source, int ac, char **av)
|
||||
|
||||
@@ -154,9 +154,13 @@ void ratbox_set_umode(User * user, int ac, char **av)
|
||||
|
||||
while (*modes) {
|
||||
|
||||
add ? (user->mode |= umodes[(int) *modes]) : (user->mode &=
|
||||
~umodes[(int)
|
||||
*modes]);
|
||||
/* This looks better, much better than "add ? (do_add) : (do_remove)".
|
||||
* At least this is readable without paying much attention :) -GD
|
||||
*/
|
||||
if (add)
|
||||
user->mode |= umodes[(int) *modes];
|
||||
else
|
||||
user->mode &= ~umodes[(int) *modes];
|
||||
|
||||
switch (*modes++) {
|
||||
case '+':
|
||||
@@ -997,15 +1001,11 @@ int anope_event_away(char *source, int ac, char **av)
|
||||
{
|
||||
User *u = NULL;
|
||||
|
||||
if (ac) {
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
if (UseTS6) {
|
||||
u = find_byuid(source);
|
||||
}
|
||||
|
||||
m_away((UseTS6 ? (u ? u->nick : source) : source), av[0]);
|
||||
|
||||
m_away((UseTS6 ? (u ? u->nick : source) : source), (ac ? av[0] : NULL));
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
|
||||
@@ -157,9 +157,13 @@ void shadowircd_set_umode(User * user, int ac, char **av)
|
||||
|
||||
while (*modes) {
|
||||
|
||||
add ? (user->mode |= umodes[(int) *modes]) : (user->mode &=
|
||||
~umodes[(int)
|
||||
*modes]);
|
||||
/* This looks better, much better than "add ? (do_add) : (do_remove)".
|
||||
* At least this is readable without paying much attention :) -GD
|
||||
*/
|
||||
if (add)
|
||||
user->mode |= umodes[(int) *modes];
|
||||
else
|
||||
user->mode &= ~umodes[(int) *modes];
|
||||
|
||||
switch (*modes++) {
|
||||
case '+':
|
||||
@@ -1007,13 +1011,9 @@ int anope_event_away(char *source, int ac, char **av)
|
||||
{
|
||||
User *u = NULL;
|
||||
|
||||
if (ac) {
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
u = find_byuid(source);
|
||||
|
||||
m_away(u->nick, av[0]);
|
||||
m_away(u->nick, (ac ? av[0] : NULL));
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
|
||||
@@ -155,9 +155,13 @@ void solidircd_set_umode(User * user, int ac, char **av)
|
||||
|
||||
while (*modes) {
|
||||
|
||||
add ? (user->mode |= umodes[(int) *modes]) : (user->mode &=
|
||||
~umodes[(int)
|
||||
*modes]);
|
||||
/* This looks better, much better than "add ? (do_add) : (do_remove)".
|
||||
* At least this is readable without paying much attention :) -GD
|
||||
*/
|
||||
if (add)
|
||||
user->mode |= umodes[(int) *modes];
|
||||
else
|
||||
user->mode &= ~umodes[(int) *modes];
|
||||
|
||||
switch (*modes++) {
|
||||
case '+':
|
||||
@@ -1301,15 +1305,11 @@ void solidircd_cmd_quit(char *source, char *buf)
|
||||
|
||||
int anope_event_away(char *source, int ac, char **av)
|
||||
{
|
||||
if (ac) {
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
if (!source) {
|
||||
return MOD_CONT;
|
||||
}
|
||||
m_away(source, av[0]);
|
||||
return MOD_CONT;
|
||||
m_away(source, (ac ? av[0] : NULL));
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
int anope_event_ping(char *source, int ac, char **av)
|
||||
|
||||
+10
-10
@@ -154,9 +154,13 @@ void ultiamte2_set_umode(User * user, int ac, char **av)
|
||||
|
||||
while (*modes) {
|
||||
|
||||
add ? (user->mode |= umodes[(int) *modes]) : (user->mode &=
|
||||
~umodes[(int)
|
||||
*modes]);
|
||||
/* This looks better, much better than "add ? (do_add) : (do_remove)".
|
||||
* At least this is readable without paying much attention :) -GD
|
||||
*/
|
||||
if (add)
|
||||
user->mode |= umodes[(int) *modes];
|
||||
else
|
||||
user->mode &= ~umodes[(int) *modes];
|
||||
|
||||
switch (*modes++) {
|
||||
case '+':
|
||||
@@ -1111,15 +1115,11 @@ int anope_event_ping(char *source, int ac, char **av)
|
||||
|
||||
int anope_event_away(char *source, int ac, char **av)
|
||||
{
|
||||
if (ac) {
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
if (!source) {
|
||||
return MOD_CONT;
|
||||
}
|
||||
m_away(source, av[0]);
|
||||
return MOD_CONT;
|
||||
m_away(source, (ac ? av[0] : NULL));
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
int anope_event_topic(char *source, int ac, char **av)
|
||||
@@ -1407,7 +1407,7 @@ void ultimate2_cmd_guest_nick(char *nick, char *user, char *host,
|
||||
{
|
||||
send_cmd(NULL, "NICK %s 1 %ld %s %s %s 0 :%s", nick,
|
||||
(long int) time(NULL), user, host, ServerName, real);
|
||||
anope_cmd_mode(nick, "MODE %s %s", nick, modes);
|
||||
anope_cmd_mode(nick, nick, "MODE %s %s", modes);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -152,9 +152,13 @@ void ultimate3_set_umode(User * user, int ac, char **av)
|
||||
|
||||
while (*modes) {
|
||||
|
||||
add ? (user->mode |= umodes[(int) *modes]) : (user->mode &=
|
||||
~umodes[(int)
|
||||
*modes]);
|
||||
/* This looks better, much better than "add ? (do_add) : (do_remove)".
|
||||
* At least this is readable without paying much attention :) -GD
|
||||
*/
|
||||
if (add)
|
||||
user->mode |= umodes[(int) *modes];
|
||||
else
|
||||
user->mode &= ~umodes[(int) *modes];
|
||||
|
||||
switch (*modes++) {
|
||||
case '+':
|
||||
@@ -779,15 +783,11 @@ int anope_event_436(char *source, int ac, char **av)
|
||||
|
||||
int anope_event_away(char *source, int ac, char **av)
|
||||
{
|
||||
if (ac) {
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
if (!source) {
|
||||
return MOD_CONT;
|
||||
}
|
||||
m_away(source, av[0]);
|
||||
return MOD_CONT;
|
||||
m_away(source, (ac ? av[0] : NULL));
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
int anope_event_topic(char *source, int ac, char **av)
|
||||
|
||||
@@ -373,9 +373,13 @@ void unreal_set_umode(User * user, int ac, char **av)
|
||||
|
||||
while (*modes) {
|
||||
|
||||
add ? (user->mode |= umodes[(int) *modes]) : (user->mode &=
|
||||
~umodes[(int)
|
||||
*modes]);
|
||||
/* This looks better, much better than "add ? (do_add) : (do_remove)".
|
||||
* At least this is readable without paying much attention :) -GD
|
||||
*/
|
||||
if (add)
|
||||
user->mode |= umodes[(int) *modes];
|
||||
else
|
||||
user->mode &= ~umodes[(int) *modes];
|
||||
|
||||
switch (*modes++) {
|
||||
case '+':
|
||||
@@ -1000,15 +1004,11 @@ int anope_event_436(char *source, int ac, char **av)
|
||||
|
||||
int anope_event_away(char *source, int ac, char **av)
|
||||
{
|
||||
if (ac) {
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
if (!source) {
|
||||
return MOD_CONT;
|
||||
}
|
||||
m_away(source, av[0]);
|
||||
return MOD_CONT;
|
||||
m_away(source, (ac ? av[0] : NULL));
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
int anope_event_topic(char *source, int ac, char **av)
|
||||
|
||||
@@ -427,9 +427,13 @@ void unreal_set_umode(User * user, int ac, char **av)
|
||||
|
||||
while (*modes) {
|
||||
|
||||
add ? (user->mode |= umodes[(int) *modes]) : (user->mode &=
|
||||
~umodes[(int)
|
||||
*modes]);
|
||||
/* This looks better, much better than "add ? (do_add) : (do_remove)".
|
||||
* At least this is readable without paying much attention :) -GD
|
||||
*/
|
||||
if (add)
|
||||
user->mode |= umodes[(int) *modes];
|
||||
else
|
||||
user->mode &= ~umodes[(int) *modes];
|
||||
|
||||
switch (*modes++) {
|
||||
case '+':
|
||||
@@ -1173,15 +1177,11 @@ int anope_event_436(char *source, int ac, char **av)
|
||||
*/
|
||||
int anope_event_away(char *source, int ac, char **av)
|
||||
{
|
||||
if (ac) {
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
if (!source) {
|
||||
return MOD_CONT;
|
||||
}
|
||||
m_away(source, av[0]);
|
||||
return MOD_CONT;
|
||||
m_away(source, (ac ? av[0] : NULL));
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
+10
-10
@@ -157,9 +157,13 @@ void viagra_set_umode(User * user, int ac, char **av)
|
||||
|
||||
while (*modes) {
|
||||
|
||||
add ? (user->mode |= umodes[(int) *modes]) : (user->mode &=
|
||||
~umodes[(int)
|
||||
*modes]);
|
||||
/* This looks better, much better than "add ? (do_add) : (do_remove)".
|
||||
* At least this is readable without paying much attention :) -GD
|
||||
*/
|
||||
if (add)
|
||||
user->mode |= umodes[(int) *modes];
|
||||
else
|
||||
user->mode &= ~umodes[(int) *modes];
|
||||
|
||||
switch (*modes++) {
|
||||
case '+':
|
||||
@@ -886,15 +890,11 @@ void viagra_cmd_quit(char *source, char *buf)
|
||||
|
||||
int anope_event_away(char *source, int ac, char **av)
|
||||
{
|
||||
if (ac) {
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
if (!source) {
|
||||
return MOD_CONT;
|
||||
}
|
||||
m_away(source, av[0]);
|
||||
return MOD_CONT;
|
||||
m_away(source, (ac ? av[0] : NULL));
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
int anope_event_ping(char *source, int ac, char **av)
|
||||
@@ -1131,7 +1131,7 @@ int anope_event_motd(char *source, int ac, char **av)
|
||||
|
||||
void viagra_cmd_notice_ops(char *source, char *dest, char *buf)
|
||||
{
|
||||
if (!buf) {
|
||||
if (buf) {
|
||||
send_cmd(NULL, "NOTICE @%s :%s", dest, buf);
|
||||
}
|
||||
return;
|
||||
|
||||
+5
-1
@@ -8,10 +8,14 @@
|
||||
VERSION_MAJOR="1"
|
||||
VERSION_MINOR="7"
|
||||
VERSION_PATCH="8"
|
||||
VERSION_BUILD="757"
|
||||
VERSION_BUILD="758"
|
||||
|
||||
# $Log$
|
||||
#
|
||||
# BUILD : 1.7.8 (758)
|
||||
# BUGS : 332
|
||||
# NOTES : FIXED: anope_event_away() doing dangerous things with ac/av, viagra had issues in notice_ops, anope_cmd_mode() used wrongly for dreamforge and ultimate2
|
||||
#
|
||||
# BUILD : 1.7.8 (757)
|
||||
# BUGS : 355 361
|
||||
# NOTES : FIXED: Seperated +q/+a and +o in chan_set_correct_modes, and used +Z (and not +R) for services roots with ultimate3.
|
||||
|
||||
Reference in New Issue
Block a user