public override void onGbxCallBack(object sender, GbxCallbackEventArgs args) { switch (args.Response.MethodName) { case "TrackMania.PlayerChat": ArrayList chatInfos = args.Response.Params; break; } }
public override void onGbxCallBack(object sender, GbxCallbackEventArgs args) { switch (args.Response.MethodName) { case "ManiaPlanet.PlayerChat": case "TrackMania.PlayerChat": var htPlayerChat = args.Response.Params; string msg = (string)htPlayerChat[2]; string login = (string)htPlayerChat[1]; if (rx.IsMatch(msg)) //Check is command (/....)------------------------ { //Admin Commands//////////////////////////////////////////////////////////////// if (msg.Contains("/admin ") && msg.Length > 7 && adminLogins.Contains(login)) { msg = subsep(msg, "/admin "); switch (msg) { case "help": break; case "savematchfile": break; default: //Commands with args or bad command if (msg.IndexOf("setgamemode ") == 0) { } else if (msg.IndexOf("warn ") == 0) { } else if (msg.IndexOf("kick ") == 0) { } else if (msg.IndexOf("ban ") == 0) { } else if (msg.IndexOf("black ") == 0) { } else if (msg.IndexOf("guest ") == 0) { } break; } } else //User Commands////////////////////////////////////////////////////////// { } } break; } }
public abstract void onGbxCallBack(GbxCallbackEventArgs res);
/// <summary> /// Cast .Params[0] to Hashtable /// </summary> /// <param name="call"></param> /// <returns></returns> public static Hashtable getHashTable(this GbxCallbackEventArgs call) { return((Hashtable)call.Response.Params[0]); }
/// <summary> /// CallBack Event /// </summary> /// <param name="sender"></param> /// <param name="args"></param> public abstract void onGbxCallBack(object sender, GbxCallbackEventArgs args);
public override void onGbxCallBack(GbxCallbackEventArgs res) { throw new NotImplementedException(); }