mirror of
https://github.com/ergochat/ergo.git
synced 2025-02-18 06:30:39 +01:00
remove redundant oper check from DEBUG
This commit is contained in:
parent
b139386391
commit
af256fccd3
@ -27,7 +27,7 @@ func (cmd *Command) Run(server *Server, client *Client, msg ircmsg.IrcMessage) b
|
|||||||
client.Send(nil, server.name, ERR_NOTREGISTERED, client.nick, client.t("You need to register before you can use that command"))
|
client.Send(nil, server.name, ERR_NOTREGISTERED, client.nick, client.t("You need to register before you can use that command"))
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
if cmd.oper && !client.flags[modes.Operator] {
|
if cmd.oper && !client.HasMode(modes.Operator) {
|
||||||
client.Send(nil, server.name, ERR_NOPRIVILEGES, client.nick, client.t("Permission Denied - You're not an IRC operator"))
|
client.Send(nil, server.name, ERR_NOPRIVILEGES, client.nick, client.t("Permission Denied - You're not an IRC operator"))
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
@ -477,14 +477,7 @@ func csHandler(server *Server, client *Client, msg ircmsg.IrcMessage, rb *Respon
|
|||||||
|
|
||||||
// DEBUG <subcmd>
|
// DEBUG <subcmd>
|
||||||
func debugHandler(server *Server, client *Client, msg ircmsg.IrcMessage, rb *ResponseBuffer) bool {
|
func debugHandler(server *Server, client *Client, msg ircmsg.IrcMessage, rb *ResponseBuffer) bool {
|
||||||
param, err := Casefold(msg.Params[0])
|
param := strings.ToUpper(msg.Params[0])
|
||||||
if err != nil {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
if !client.HasMode(modes.Operator) {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
switch param {
|
switch param {
|
||||||
case "GCSTATS":
|
case "GCSTATS":
|
||||||
|
Loading…
x
Reference in New Issue
Block a user