mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: May 2014
Posts: 6
F
Fonjask Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
F
Joined: May 2014
Posts: 6
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):
Code:
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:
Code:
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!

Joined: Jan 2004
Posts: 1,358
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Jan 2004
Posts: 1,358
You didn't pass anything to your alias.

asciiban $1-

Joined: May 2014
Posts: 6
F
Fonjask Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
F
Joined: May 2014
Posts: 6
Okay, thanks a bunch!

For future reference, what kind of things should be passed to aliases? Seeing as $nick worked perfectly fine without me having to pass it? What qualify as arguments in this case? Just the message in this context?


Link Copied to Clipboard