Commit 51d6114a authored by Cool Fire's avatar Cool Fire

Make command char use regex escape

parent e19f0b1f
Pipeline #993 passed with stages
in 4 minutes and 1 second
......@@ -9,7 +9,7 @@ class Configuration
@pass = "" # NickServ password
@version = "Nanobot 4 beta 4" # Version
@command = '\?' # Character prefix for commands (escape special chars)
@command = '?' # Character prefix for commands
@server = "irc.insomnia247.nl" # IPv4 address
@server6 = "irc6.insomnia247.nl" # IPv6 address
......
......@@ -64,7 +64,7 @@ class IRCSubs
end
def privmsg( nick, user, host, from, message )
cmd = @config.command
cmd = Regexp.escape( @config.command )
# Fall-through for !# 'do not handle' prefix
if( message =~ /^#{cmd}#/ )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment