diff --git a/configs/sourceirc.cfg b/configs/sourceirc.cfg
new file mode 100755
index 0000000..76d1873
--- /dev/null
+++ b/configs/sourceirc.cfg
@@ -0,0 +1,64 @@
+"SourceIRC"
+{
+ "Access"
+ {
+ "Hostmasks"
+ {
+ // Put hostmasks followed by SourceMod admin permissions here, Just like you would in IRC, * and ? wildcards are supported.
+ "Yournick!YourIdent@yourdomain.com" "z"
+ }
+ }
+ "Server"
+ {
+ "server" "irc.gamesurge.net" // Server to connect to
+ "port" "6667"
+ "nickname" "SourceIRC"
+ "realname" "SourceIRC"
+ "channels"
+ {
+ "#sourceirc"
+ {
+ "relay" "1" // Tell the RelayAll module to relay messages to this channel
+ "cmd_prefix" "!" // Ontop of calling the bot by name, you can also use "!" in this channel
+ }
+ "#sourceirc-admin"
+ {
+ "ticket" "1" // Tell the ticket module to send tickets to this channel
+ }
+ }
+ }
+ "Settings"
+ {
+ "msg-rate" "1.0" // Seconds to wait between sending messages, set to 0 to disable. Setting this too low can cause the bot to be kicked from the server for "Excess flood".
+ // Team colors, use -1 to set no color.
+ "teamcolor-0" "15" // Unassigned
+ "teamcolor-1" "15" // Spectators
+ "teamcolor-2" "04" // Red / Terrorist
+ "teamcolor-3" "12" // Blue / Counter Terrorist
+ "server-domain" "" // Servers domain/external IP. Leave blank for autodetect. Good if your server is running behind a router and has a local IP or you use a domain. This is only used for cosmetic purposes.
+ }
+ "Ticket"
+ {
+ "Menu"
+ {
+ "Abusive" "Abusive"
+ "Racism" "Racism"
+ "General cheating/exploits" "General cheating/exploits"
+ "Wallhack" "Wallhack"
+ "Aimbot" "Aimbot"
+ "Speedhacking" "Speedhacking"
+ "Mic spamming" "Mic spamming"
+ "Admin disrepect" "Admin disrepect"
+ "Camping" "Camping"
+ "Team killing" "Team killing"
+ "Unacceptable Spray" "Unacceptable Spray"
+ "Breaking Server Rules" "Breaking Server Rules"
+ "Other" "Other"
+ }
+ "Settings"
+ {
+ "spray_url" "" // If you have a URL where sprays can be downloaded, put it here and the bot will link to it in bad spray reports. Use {SPRAY} to insert the ID of the spray that's being reported. Leave blank to disable.
+ "custom_msg" "" // Send this message when a ticket is submitted, good for mass highlighting everyone when a ticket is received.
+ }
+ }
+}
diff --git a/scripting/SourceIRC/sourceirc-ban.sp b/scripting/SourceIRC/sourceirc-ban.sp
new file mode 100644
index 0000000..ed3dcac
--- /dev/null
+++ b/scripting/SourceIRC/sourceirc-ban.sp
@@ -0,0 +1,133 @@
+/*
+ This file is part of SourceIRC.
+
+ SourceIRC is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ SourceIRC is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with SourceIRC. If not, see .
+*/
+
+#undef REQUIRE_PLUGIN
+#include
+
+#pragma semicolon 1
+#pragma dynamic 65535
+
+
+public Plugin:myinfo = {
+ name = "SourceIRC -> Ban",
+ author = "Azelphur",
+ description = "Adds ban command to SourceIRC",
+ version = IRC_VERSION,
+ url = "http://Azelphur.com/project/sourceirc"
+};
+
+public OnPluginStart() {
+ LoadTranslations("common.phrases");
+ LoadTranslations("plugin.basecommands");
+}
+
+public OnAllPluginsLoaded() {
+ if (LibraryExists("sourceirc"))
+ IRC_Loaded();
+}
+
+public OnLibraryAdded(const String:name[]) {
+ if (StrEqual(name, "sourceirc"))
+ IRC_Loaded();
+}
+
+IRC_Loaded() {
+ IRC_CleanUp(); // Call IRC_CleanUp as this function can be called more than once.
+ IRC_RegAdminCmd("ban", Command_Ban, ADMFLAG_BAN, "ban <#userid|name> [reason] - Bans a player from the server");
+}
+
+public Action:Command_Ban(const String:nick[], args) {
+ // Blatently borrowed code from basebans/bans
+ if (args < 2)
+ {
+ IRC_ReplyToCommand(nick, "Usage: ban <#userid|name> [reason]");
+ return Plugin_Handled;
+ }
+
+ decl len, next_len;
+ decl String:Arguments[256];
+ IRC_GetCmdArgString(Arguments, sizeof(Arguments));
+
+ decl String:arg[65];
+ len = BreakString(Arguments, arg, sizeof(arg));
+
+ new target = IRC_FindTarget(nick, arg, true);
+ if (target == -1)
+ {
+ return Plugin_Handled;
+ }
+
+ decl String:s_time[12];
+ if ((next_len = BreakString(Arguments[len], s_time, sizeof(s_time))) != -1)
+ {
+ len += next_len;
+ }
+ else
+ {
+ len = 0;
+ Arguments[0] = '\0';
+ }
+
+ new time = StringToInt(s_time);
+
+ PrepareBan(nick, target, time, Arguments[len]);
+
+ return Plugin_Handled;
+}
+
+PrepareBan(const String:nick[], target, time, const String:reason[])
+{
+ decl String:authid[64], String:name[32];
+ GetClientAuthString(target, authid, sizeof(authid));
+ GetClientName(target, name, sizeof(name));
+
+ if (!time)
+ {
+ if (reason[0] == '\0')
+ {
+ IRC_ReplyToCommand(nick, "%t", "Permabanned player", name);
+ } else {
+ IRC_ReplyToCommand(nick, "%t", "Permabanned player reason", name, reason);
+ }
+ } else {
+ if (reason[0] == '\0')
+ {
+ IRC_ReplyToCommand(nick, "%t", "Banned player", name, time);
+ } else {
+ IRC_ReplyToCommand(nick, "%t", "Banned player reason", name, time, reason);
+ }
+ }
+
+ decl String:hostmask[IRC_MAXLEN];
+ IRC_GetHostMask(hostmask, sizeof(hostmask));
+ LogAction(-1, target, "\"%s\" banned \"%L\" (minutes \"%d\") (reason \"%s\")", hostmask, target, time, reason);
+
+ if (reason[0] == '\0')
+ {
+ BanClient(target, time, BANFLAG_AUTO, "Banned", "Banned", "sourceirc_ban", 0);
+ }
+ else
+ {
+ BanClient(target, time, BANFLAG_AUTO, reason, reason, "sourceirc_ban", 0);
+ }
+}
+
+public OnPluginEnd() {
+ IRC_CleanUp();
+}
+
+// http://bit.ly/defcon
diff --git a/scripting/SourceIRC/sourceirc-changemap.sp b/scripting/SourceIRC/sourceirc-changemap.sp
new file mode 100644
index 0000000..d2d9ded
--- /dev/null
+++ b/scripting/SourceIRC/sourceirc-changemap.sp
@@ -0,0 +1,92 @@
+/*
+ This file is part of SourceIRC.
+
+ SourceIRC is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ SourceIRC is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with SourceIRC. If not, see .
+*/
+
+#undef REQUIRE_PLUGIN
+#include
+
+#pragma semicolon 1
+#pragma dynamic 65535
+
+public Plugin:myinfo = {
+ name = "SourceIRC -> Change Map",
+ author = "Azelphur",
+ description = "Adds a changemap command to SourceIRC",
+ version = IRC_VERSION,
+ url = "http://Azelphur.com/project/sourceirc"
+};
+
+public OnPluginStart() {
+ LoadTranslations("sourceirc.phrases");
+}
+
+public OnAllPluginsLoaded() {
+ if (LibraryExists("sourceirc"))
+ IRC_Loaded();
+}
+
+public OnLibraryAdded(const String:name[]) {
+ if (StrEqual(name, "sourceirc"))
+ IRC_Loaded();
+}
+
+IRC_Loaded() {
+ IRC_CleanUp(); // Call IRC_CleanUp as this function can be called more than once.
+ IRC_RegAdminCmd("changemap", Command_ChangeMap, ADMFLAG_CHANGEMAP, "changemap