Change /FSETs SERVER_NOTICE_KLINE and SERVER_NOTICE_GLINE to show the ban type

The ban type (eg. K-Line, G-Line, D-Line etc.) is now passed in the second-last
argument of these formats.
This commit is contained in:
Kevin Easton
2016-05-10 18:30:55 +10:00
parent df2e250ccf
commit 43d482a444
3 changed files with 9 additions and 6 deletions

View File

@@ -1,5 +1,8 @@
[Changes 1.2.2]
* Change formatting of /FSETs SERVER_NOTICE_KLINE and SERVER_NOTICE_GLINE
to show the ban type. (caf)
* Clean up handling of oper server notices, including removing some
obsolete notice types (eg "high-traffic mode"). (caf)

View File

@@ -237,8 +237,8 @@
#define DEFAULT_FORMAT_SERVER_NOTICE_FAKE_FSET "Fake Mode detected on $1 -> $2-"
#define DEFAULT_FORMAT_SERVER_NOTICE_KILL_FSET "Foreign OperKill: %W$1%n killed %c$2%n %K(%n$3-%K)%n"
#define DEFAULT_FORMAT_SERVER_NOTICE_KILL_LOCAL_FSET "Local OperKill: %W$1%n killed %c$2%n %K(%n$3-%K)%n"
#define DEFAULT_FORMAT_SERVER_NOTICE_KLINE_FSET "%W$1%n added a new K-Line %K[%c$2%K]%n for $3-"
#define DEFAULT_FORMAT_SERVER_NOTICE_GLINE_FSET "%W$1%n added a new K-Line %K[%c$2%K]%n from $3 for $4-"
#define DEFAULT_FORMAT_SERVER_NOTICE_KLINE_FSET "%W$1%n added a new $3 %K[%c$2%K]%n for %K[%R$4-%K]"
#define DEFAULT_FORMAT_SERVER_NOTICE_GLINE_FSET "%W$1%n added a new $4 %K[%c$2%K]%n from %W$3%n for %K[%R$4-%K]"
#define DEFAULT_FORMAT_SERVER_NOTICE_NICK_COLLISION_FSET "Nick collision %W$1%n killed %c$2-%n"
#define DEFAULT_FORMAT_SERVER_NOTICE_OPER_FSET "%C$1 %K[%c$2%K]%n is now %Wan%w %GIRC%n whore"
#define DEFAULT_FORMAT_SERVER_NOTICE_REHASH_FSET "%W$1%n is rehashing the Server config file"
@@ -665,8 +665,8 @@
#define DEFAULT_FORMAT_SERVER_NOTICE_FAKE_FSET "Fake Mode detected on $1 -> $2-"
#define DEFAULT_FORMAT_SERVER_NOTICE_KILL_FSET "Foreign OperKill: %W$1%n killed %c$2%n %K(%n$3-%K)%n"
#define DEFAULT_FORMAT_SERVER_NOTICE_KILL_LOCAL_FSET "Local OperKill: %W$1%n killed %c$2%n %K(%n$3-%K)%n"
#define DEFAULT_FORMAT_SERVER_NOTICE_KLINE_FSET "%W$1%n added a new K-Line %K[%c$2%K]%n for $3-"
#define DEFAULT_FORMAT_SERVER_NOTICE_GLINE_FSET "%W$1%n added a new K-Line %K[%c$2%K]%n from $3 for $4-"
#define DEFAULT_FORMAT_SERVER_NOTICE_KLINE_FSET "%W$1%n added a new $3 %K[%c$2%K]%n for %K[%R$4-%K]"
#define DEFAULT_FORMAT_SERVER_NOTICE_GLINE_FSET "%W$1%n added a new $4 %K[%c$2%K]%n from %W$3%n for %K[%R$4-%K]"
#define DEFAULT_FORMAT_SERVER_NOTICE_NICK_COLLISION_FSET "Nick collision %W$1%n killed %c$2-%n"
#define DEFAULT_FORMAT_SERVER_NOTICE_OPER_FSET "%C$1 %K[%c$2%K]%n is now %Wan%w %GIRC%n whore"
#define DEFAULT_FORMAT_SERVER_NOTICE_REHASH_FSET "%W$1%n is rehashing the Server config file"

View File

@@ -208,10 +208,10 @@ static void handle_oper_vision(const char *from, const char *line)
if (sscanf(arg[0], "%100[^!]!%*[^@]@%*[^{]{%100s", oper, serv) == 2 && strchr(serv, '.'))
{
chop(serv, 1);
serversay(from, "%s", convert_output_format(fget_string_var(FORMAT_SERVER_NOTICE_GLINE_FSET), "%s %s %s %s [%s]", update_clock(GET_TIME), oper, arg[2], serv, arg[3]));
serversay(from, "%s", convert_output_format(fget_string_var(FORMAT_SERVER_NOTICE_GLINE_FSET), "%s %s %s %s %s %s", update_clock(GET_TIME), oper, arg[2], serv, arg[1], arg[3]));
}
else
serversay(from, "%s", convert_output_format(fget_string_var(FORMAT_SERVER_NOTICE_KLINE_FSET), "%s %s %s [%s]", update_clock(GET_TIME), arg[0], arg[2], arg[3]));
serversay(from, "%s", convert_output_format(fget_string_var(FORMAT_SERVER_NOTICE_KLINE_FSET), "%s %s %s %s %s", update_clock(GET_TIME), arg[0], arg[2], arg[1], arg[3]));
}
/* "User %s (%s@%s) trying to join %s is a possible spambot"
* "User %s (%s@%s) is a possible spambot"