View Single Post
Author Message
DarthNinja
SourceMod Plugin Approver
Join Date: Mar 2009
Location: PreThinkHook()
Old 12-29-2010 , 05:52   [TF2] SourceIRC ItemBot [v2.5.1]
Reply With Quote #1

[TF2] SourceIRC ItemBot
Version 2.5.1
Mailer Version 1.5.0





Description:
Announces item transactions (found, traded, crafted, bought, etc) to IRC with item name, quality and level.

Config allows for IRC users to be highlighted when an ingame player finds an item/hat.

For screenshots, click here, here, or here.

Requires SourceIRC and BackpackHook.

*NEW*
Can email configured users when they find a hat! Awesome feature for idle servers


Commands:
sm_reloaditembot - Reloads configs

IRC Commands:
backpack or bp: Returns a TF2B backpack link for a user
Examples:
  • bp "Player on server"
  • bp STEAM_0:1:123456
  • bp CustomSteamURL

Cvars:
  • sm_itembot_version - Plugin Version
  • sm_itembot_debug "0" - Set to "1" to print name debugging info.
  • sm_itembot_timestamp "0" - Show/hide item timestamps
  • sm_itembot_showsteams "1" - Show steamids when players disconnect (for looking at backpacks later)
  • sm_itembot_timeoffset - number of seconds to correct server clock by
Mail cvars:
  • sm_itembot_mail "0" - Set to 1 if you plan to use the mailer
  • sm_itembot_mailer - Http link to the mailer php file
  • sm_itembot_auth - The auth code you set in the mailer file
  • sm_itembot_mailerdebug - enables debug mode (sends emails for traded hats as well)
Install Instructions:
  1. Place ItemBot.smx into your addons/sourcemod/plugins/ folder.
  2. Configure ItemBot_Users.cfg and place in addons/sourcemod/configs/
  3. Place ItemBot_Items.txt in addons/sourcemod/configs/
  4. Edit your sourceirc.cfg and add "items" "1" to a channel.
  5. Edit the cvars in the ItemBot.cfg file
Mailer:
  1. Set up user mail settings in the user config
  2. Change your settings in the mailer.php file
  3. Edit the mail cvars in the ItemBot.cfg file
Notes:
ItemBot_Users.cfg Configuration:
Example Config:
Code:
"users"
{
    "STEAM_0:0:1"
    {
        // When steamid user "STEAM_0:0:1" finds a Hat, "DarthNinja" will be highlighted in IRC
        "ircuser"             "DarthNinja"
        "filter"            "Hats"
        "email"                "1"
        "sendto"            "[email protected]"
        // An email will be sent to this email when a hat is found (see example email below)
    }
    "STEAM_0:1:2"
    {
        // When steamid user "STEAM_0:1:2" finds "Any" item, "Ninja" will be highlighted
        "ircuser"             "Ninja"
        "filter"            "Any"
    }
}
In the upper entry you would replace STEAM_0:1:2 with the SteamID of a player you wish to receive notices about.

"DarthNinja" would be replaced with the IRC username of whoever should get the notices.

"filter" ("Hats") can have one of two values:
  • "Hats" = Only notify about hats.
  • "Any" = Notify about any item.
You can have as many player entries in the config as you like.
ItemBot_Items.txt:
This file does not need to be edited except to add any new items Valve may add in the future.

It is a direct copy-paste of the (item) related bits in tf_english.txt

Note:
If someone is interested in doing the same thing with the other language files, I will update the plugin to include a cvar to set what language to use.

sourceirc.cfg Example:
Code:
           "#MyChannel"
            {
                "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
                "items"            "1"
            }
            "#MyOtherChannel"
            {
                "ticket"        "1" // Tell the ticket module to send tickets to this channel
                "items"            "1"  // Prints all items to this channel
            }
            "#Ninja"
            {
                "items"            "1"  // Prints all items to this channel
            }
            "#MyPrivateChannel"
            {
                "taggeditems"            "1"  // Prints only items found on accounts found in ItemBot_Users.cfg to this channel
            }
ToDo:
  • Email notice for when you stop finding items
Version History:
  • V1.0.0
    • Initial release
  • V1.2.0
    • Message backgrounds are now black so users can see colors correctly.
    • Adds "debug mode" cvar to help identify "Unknown Items" should they occur.
    • New channel filter: "taggeditems" - Only items found on accounts set up in the ItemBot_Users.cfg will be tracked
  • V2.5.1
    • Command to reload configs
    • Backpack lookup command
    • Timestamps for items
    • Time offset for timestamps
    • Mailer and related cvars
    • Plugin will announce to irc items channels when it is loaded
    • Steamids can be printed when a player disconnects
Mailer Version History:
  • V1.5.0
    • Initial release
Attached Files
File Type: zip SourceIRC - ItemBot v2.5.1.zip (29.0 KB, 295 views)
File Type: zip ItemBot Mailer V1.5.0.zip (32.2 KB, 208 views)
__________________

Last edited by DarthNinja; 10-31-2011 at 22:53.
DarthNinja is offline