public void OnUserSay(string nick, string message, int length, ref string[] args) { foreach (Module module in m_modules) { module.OnUserSay(nick, message, length, ref args); } Channel chan = GetChannel(); UserData user = chan != null?chan.GetUserData(nick) : null; if (user == null) { return; // Left channel or kicked player } // Command shortcuts: "$uno p" becomes "$p" unless escaped using "$$" if (user.cmd_scope != null && message[1] != '$') { if (user.cmd_scope.Run(nick, message.Substring(1))) { return; } } if (message[1] == '$') { // Unescape message = message.Substring(1); } m_chatcommands.Run(nick, message); }
public void OnUserSay(string nick, string message, int length, ref string[] args) { foreach (Module module in m_modules) { module.OnUserSay(nick, message, length, ref args); } UserData user = GetChannel().GetUserData(nick); // Command shortcuts: "$uno p" becomes "$p" unless escaped using "$$" if (user.cmd_scope != null && message[G.settings["prefix"].Length] != G.settings["escchar"][0]) { if (user.cmd_scope.Run(nick, message.Substring(1))) { return; } } if (message[G.settings["prefix"].Length] == G.settings["escchar"][0]) { // Unescape message = message.Substring(1); } m_chatcommands.Run(nick, message); }