diff options
-rw-r--r-- | src/cmd_connect.cpp | 3 | ||||
-rw-r--r-- | src/cmd_eline.cpp | 49 | ||||
-rw-r--r-- | src/cmd_gline.cpp | 3 | ||||
-rw-r--r-- | src/cmd_info.cpp | 75 |
4 files changed, 71 insertions, 59 deletions
diff --git a/src/cmd_connect.cpp b/src/cmd_connect.cpp index 2ee17f145..7c1d0b2f9 100644 --- a/src/cmd_connect.cpp +++ b/src/cmd_connect.cpp @@ -31,6 +31,9 @@ using namespace std; #include "typedefs.h" #include "cmd_connect.h" +/* + * This is handled by the server linking module, if necessary. Do not remove this stub. + */ void cmd_connect::Handle (char **parameters, int pcnt, userrec *user) { } diff --git a/src/cmd_eline.cpp b/src/cmd_eline.cpp index 48c856dd3..b7b49472c 100644 --- a/src/cmd_eline.cpp +++ b/src/cmd_eline.cpp @@ -48,33 +48,36 @@ extern std::vector<ircd_module*> factory; void cmd_eline::Handle (char **parameters, int pcnt, userrec *user) { - if (pcnt >= 3) - { + if (pcnt >= 3) + { if (host_matches_everyone(parameters[0],user)) return; - add_eline(duration(parameters[1]),user->nick,parameters[2],parameters[0]); + + add_eline(duration(parameters[1]),user->nick,parameters[2],parameters[0]); FOREACH_MOD(I_OnAddELine,OnAddELine(duration(parameters[1]), user, parameters[2], parameters[0])); - if (!duration(parameters[1])) - { - WriteOpers("*** %s added permenant E-line for %s.",user->nick,parameters[0]); - } - else - { - WriteOpers("*** %s added timed E-line for %s, expires in %d seconds.",user->nick,parameters[0],duration(parameters[1])); - } - } - else - { - if (del_eline(parameters[0])) - { + + if (!duration(parameters[1])) + { + WriteOpers("*** %s added permenant E-line for %s.",user->nick,parameters[0]); + } + else + { + WriteOpers("*** %s added timed E-line for %s, expires in %d seconds.",user->nick,parameters[0],duration(parameters[1])); + } + } + else + { + if (del_eline(parameters[0])) + { FOREACH_MOD(I_OnDelELine,OnDelELine(user, parameters[0])); - WriteOpers("*** %s Removed E-line on %s.",user->nick,parameters[0]); - } - else - { - WriteServ(user->fd,"NOTICE %s :*** E-Line %s not found in list, try /stats e.",user->nick,parameters[0]); - } - } + WriteOpers("*** %s Removed E-line on %s.",user->nick,parameters[0]); + } + else + { + WriteServ(user->fd,"NOTICE %s :*** E-Line %s not found in list, try /stats e.",user->nick,parameters[0]); + } + } + // no need to apply the lines for an eline } diff --git a/src/cmd_gline.cpp b/src/cmd_gline.cpp index b8a80cc38..5285383cc 100644 --- a/src/cmd_gline.cpp +++ b/src/cmd_gline.cpp @@ -52,8 +52,10 @@ void cmd_gline::Handle (char **parameters, int pcnt, userrec *user) { if (host_matches_everyone(parameters[0],user)) return; + add_gline(duration(parameters[1]),user->nick,parameters[2],parameters[0]); FOREACH_MOD(I_OnAddGLine,OnAddGLine(duration(parameters[1]), user, parameters[2], parameters[0])); + if (!duration(parameters[1])) { WriteOpers("*** %s added permenant G-line for %s.",user->nick,parameters[0]); @@ -62,6 +64,7 @@ void cmd_gline::Handle (char **parameters, int pcnt, userrec *user) { WriteOpers("*** %s added timed G-line for %s, expires in %d seconds.",user->nick,parameters[0],duration(parameters[1])); } + apply_lines(APPLY_GLINES); } else diff --git a/src/cmd_info.cpp b/src/cmd_info.cpp index 5c4c74df7..527c5f878 100644 --- a/src/cmd_info.cpp +++ b/src/cmd_info.cpp @@ -40,43 +40,46 @@ extern std::vector<ircd_module*> factory; void cmd_info::Handle (char **parameters, int pcnt, userrec *user) { - WriteServ(user->fd,"371 %s :. o O (The Inspire Internet Relay Chat Server) O o .",user->nick); - WriteServ(user->fd,"371 %s : ",user->nick); - WriteServ(user->fd,"371 %s :Core developers: Craig Edwards (Brain)",user->nick); - WriteServ(user->fd,"371 %s : Craig McLure",user->nick); - WriteServ(user->fd,"371 %s : ",user->nick); - WriteServ(user->fd,"371 %s :Contributors: typobox43",user->nick); - WriteServ(user->fd,"371 %s : w00t",user->nick); - WriteServ(user->fd,"371 %s : Om",user->nick); - WriteServ(user->fd,"371 %s : Jazza",user->nick); - WriteServ(user->fd,"371 %s : ",user->nick); - WriteServ(user->fd,"371 %s :Testers: CC",user->nick); - WriteServ(user->fd,"371 %s : Piggles",user->nick); - WriteServ(user->fd,"371 %s : Foamy",user->nick); - WriteServ(user->fd,"371 %s : Hart",user->nick); - WriteServ(user->fd,"371 %s : RageD",user->nick); - WriteServ(user->fd,"371 %s : [ed]",user->nick); - WriteServ(user->fd,"371 %s : Azhrarn",user->nick); - WriteServ(user->fd,"371 %s : nenolod",user->nick); - WriteServ(user->fd,"371 %s : luigiman",user->nick); - WriteServ(user->fd,"371 %s : Chu",user->nick); - WriteServ(user->fd,"371 %s : aquanight",user->nick); - WriteServ(user->fd,"371 %s : xptek",user->nick); - WriteServ(user->fd,"371 %s : Grantlinks",user->nick); - WriteServ(user->fd,"371 %s : Rob",user->nick); - WriteServ(user->fd,"371 %s : angelic",user->nick); - WriteServ(user->fd,"371 %s : Jason",user->nick); - WriteServ(user->fd,"371 %s : ThaPrince",user->nick); - WriteServ(user->fd,"371 %s : eggy",user->nick); - WriteServ(user->fd,"371 %s : ",user->nick); - WriteServ(user->fd,"371 %s :Thanks to irc-junkie and searchirc",user->nick); - WriteServ(user->fd,"371 %s :for the nice comments and the help",user->nick); - WriteServ(user->fd,"371 %s :you gave us in attracting users to",user->nick); - WriteServ(user->fd,"371 %s :this software.",user->nick); - WriteServ(user->fd,"371 %s : ",user->nick); - WriteServ(user->fd,"371 %s :Best experienced with: An IRC client.",user->nick); + WriteServ(user->fd, "371 %s :. o O (The Inspire Internet Relay Chat Server) O o .", user->nick); + WriteServ(user->fd, "371 %s : ", user->nick); + WriteServ(user->fd, "371 %s :Core Developers:", user->nick); + WriteServ(user->fd, "371 %s : Craig Edwards (Brain)", user->nick); + WriteServ(user->fd, "371 %s : Craig McLure", user->nick); + WriteServ(user->fd, "371 %s : w00t", user->nick); + WriteServ(user->fd, "371 %s : Om", user->nick); + WriteServ(user->fd, "371 %s : ", user->nick); + WriteServ(user->fd, "371 %s :Contributors:", user->nick); + WriteServ(user->fd, "371 %s : typobox43", user->nick); + WriteServ(user->fd, "371 %s : Jazza", user->nick); + WriteServ(user->fd, "371 %s : ", user->nick); + WriteServ(user->fd, "371 %s :Testers:", user->nick); + WriteServ(user->fd, "371 %s : CC", user->nick); + WriteServ(user->fd, "371 %s : Piggles", user->nick); + WriteServ(user->fd, "371 %s : Foamy", user->nick); + WriteServ(user->fd, "371 %s : Hart", user->nick); + WriteServ(user->fd, "371 %s : RageD", user->nick); + WriteServ(user->fd, "371 %s : [ed]", user->nick); + WriteServ(user->fd, "371 %s : Azhrarn", user->nick); + WriteServ(user->fd, "371 %s : nenolod", user->nick); + WriteServ(user->fd, "371 %s : luigiman", user->nick); + WriteServ(user->fd, "371 %s : Chu", user->nick); + WriteServ(user->fd, "371 %s : aquanight", user->nick); + WriteServ(user->fd, "371 %s : xptek", user->nick); + WriteServ(user->fd, "371 %s : Grantlinks", user->nick); + WriteServ(user->fd, "371 %s : Rob", user->nick); + WriteServ(user->fd, "371 %s : angelic", user->nick); + WriteServ(user->fd, "371 %s : Jason", user->nick); + WriteServ(user->fd, "371 %s : ThaPrince", user->nick); + WriteServ(user->fd, "371 %s : eggy", user->nick); + WriteServ(user->fd, "371 %s : ", user->nick); + WriteServ(user->fd, "371 %s :Thanks to irc-junkie and searchirc", user->nick); + WriteServ(user->fd, "371 %s :for the nice comments and the help", user->nick); + WriteServ(user->fd, "371 %s :you gave us in attracting users to", user->nick); + WriteServ(user->fd, "371 %s :this software.", user->nick); + WriteServ(user->fd, "371 %s : ", user->nick); + WriteServ(user->fd, "371 %s :Best experienced with: An IRC client.", user->nick); FOREACH_MOD(I_OnInfo,OnInfo(user)); - WriteServ(user->fd,"374 %s :End of /INFO list",user->nick); + WriteServ(user->fd, "374 %s :End of /INFO list", user->nick); } |