X-Git-Url: https://jfr.im/git/irc/evilnet/x3.git/blobdiff_plain/5e6460e4d3cc6acf05b3d33c314ead0f4c683f5b..a6fa003552075b0cd7873939a555da6f2de6f332:/src/proto-p10.c diff --git a/src/proto-p10.c b/src/proto-p10.c index 140e2d5..88d35f5 100644 --- a/src/proto-p10.c +++ b/src/proto-p10.c @@ -89,9 +89,11 @@ #define CMD_SERVSET "SERVSET" #define CMD_SET "SET" #define CMD_SETTIME "SETTIME" +#define CMD_SGLINE "SGLINE" #define CMD_SHUN "SHUN" #define CMD_SILENCE "SILENCE" #define CMD_SNO "SNO" +#define CMD_SSHUN "SSHUN" #define CMD_SQUERY "SQUERY" #define CMD_SQUIT "SQUIT" #define CMD_STATS "STATS" @@ -182,9 +184,11 @@ #define TOK_SERVSET "SERVSET" #define TOK_SET "SET" #define TOK_SETTIME "SE" +#define TOK_SGLINE "SGL" #define TOK_SHUN "SU" #define TOK_SILENCE "U" #define TOK_SNO "SNO" +#define TOK_SSHUN "SSU" #define TOK_SQUERY "SQUERY" #define TOK_SQUIT "SQ" #define TOK_STATS "R" @@ -284,9 +288,11 @@ #define P10_SERVSET TYPE(SERVSET) #define P10_SET TYPE(SET) #define P10_SETTIME TYPE(SETTIME) +#define P10_SGLINE TYPE(SGLINE) #define P10_SHUN TYPE(SHUN) #define P10_SILENCE TYPE(SILENCE) #define P10_SNO TYPE(SNO) +#define P10_SSHUN TYPE(SSHUN) #define P10_SQUERY TYPE(SQUERY) #define P10_SQUIT TYPE(SQUIT) #define P10_STATS TYPE(STATS) @@ -1564,7 +1570,8 @@ static struct { P(DISPLAY), P(SEE_OPERS), P(WIDE_GLINE), P(FORCE_OPMODE), P(FORCE_LOCAL_OPMODE), P(REMOTEREHASH), P(CHECK), P(SEE_SECRET_CHAN), P(SHUN), P(LOCAL_SHUN), P(WIDE_SHUN), P(ZLINE), - P(LOCAL_ZLINE), P(WIDE_ZLINE), P(LIST_CHAN), + P(LOCAL_ZLINE), P(WIDE_ZLINE), P(LIST_CHAN), P(WHOIS_NOTICE), + P(HIDE_IDLE), P(XTRAOP), P(HIDE_CHANNELS), #undef P { 0, 0 } }; @@ -2302,6 +2309,34 @@ static CMD_FUNC(cmd_gline) return 0; } +static CMD_FUNC(cmd_sgline) +{ + struct server *sender; + + if (argc < 4) + return 0; + + if (!(sender = GetServerH(origin))) + return 0; + + gline_add(origin, argv[1], strtoul(argv[2], NULL, 0), argv[argc-1], now, 0, 0); + return 1; +} + +static CMD_FUNC(cmd_sshun) +{ + struct server *sender; + + if (argc < 4) + return 0; + + if (!(sender = GetServerH(origin))) + return 0; + + shun_add(origin, argv[1], strtoul(argv[2], NULL, 0), argv[argc-1], now, 0); + return 1; +} + static CMD_FUNC(cmd_shun) { if (argc < 3) @@ -2475,8 +2510,12 @@ init_parse(void) dict_insert(irc_func_dict, TOK_WHOIS, cmd_whois); dict_insert(irc_func_dict, CMD_GLINE, cmd_gline); dict_insert(irc_func_dict, TOK_GLINE, cmd_gline); + dict_insert(irc_func_dict, CMD_SGLINE, cmd_sgline); + dict_insert(irc_func_dict, TOK_SGLINE, cmd_sgline); dict_insert(irc_func_dict, CMD_SHUN, cmd_shun); dict_insert(irc_func_dict, TOK_SHUN, cmd_shun); + dict_insert(irc_func_dict, CMD_SSHUN, cmd_sshun); + dict_insert(irc_func_dict, TOK_SSHUN, cmd_sshun); dict_insert(irc_func_dict, CMD_OPMODE, cmd_opmode); dict_insert(irc_func_dict, TOK_OPMODE, cmd_opmode); dict_insert(irc_func_dict, CMD_CLEARMODE, cmd_clearmode);