Hey everyone, I've been dabbling in IRC scripting to make a bot for Twitch.TV for a few channels I moderate for.
I've been having a lot of fun tinkering with it, but I can't get this feature to work and it bothers me a lot.
What I want it to do:
When someone sends a message using a certain (banned) keyword, I want a few things to be written to a file after that person is timed out.
- The current time (DONE)
- The banned person's name (DONE)
- The duration of the ban (DONE)
- The reason for the ban (DONE)
- The message the person was banned for (ERROR)
This is what I currently have (probably really crude, only learned it a few days ago):
on $*:text:*▒*:#: asciiban
on $*:text:*█*:#: asciiban
(...)
alias asciiban {
if ($readini(Bot.ini,$chan,FuckASCII) == 1) {
/write D:\Dropbox\Bot\Bot.txt $time $+ === $+ $nick $+ === $+ 86400s $+ === $+ ASCII $+ === $+ $1-
msg # .timeout $nick 86400
}
}
This makes the following:
23:56:51===fonjask===86400s===ASCII===
As you can see, the message I was banned for (even when using a sample message like banning the word "test") is not displayed.
I'm sure I'm overlooking something simple but I can't figure it out!
Why does $1- not work? I'm certain it worked before and googling also shows me $1-!
Thanks in advance!