Paste #11296: Edit of P#11289 - Tag Parser Bot

Date: 2014/11/17 00:08:22 UTC-08:00
Type: Denizen Script

View Raw Paste Download This Paste
Copy Link


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18


on irc message {
        if "!<context.message.starts_with[dircbot<&co> ]>" && "!<context.message.starts_with[?tag ]>" queue clear
        if <context.message.starts_with[dircbot<&co>]> {
           irc message <context.channel> "Hello <context.speaker>: Type ?tag <tag here> to test how a tag parses! For more Denizen help, type !help or !getstarted"
          }
          else {
           irc message <context.channel> "The tag '<context.message.substring[6]>' fills with '<parse:<context.message.substring[6]>>'"
          }
         announce to_console "<&b><context.speaker> in <context.channel> says <context.message>"
}
        on server start {
         wait 5s
         ~IRC connect ircserver@irc.esper.net
         IRC raw ircserver@irc.esper.net "USER dIRCBot mcmonkey.org mcmonkey.org dIRCBot"
         IRC raw ircserver@irc.esper.net "NICK dIRCBot"
         ~IRC join ircchannel@irc.esper.net#denizen-dev
         irc message ircchannel@irc.esper.net#denizen-dev "Hello World"
}