| View previous topic :: View next topic |
| Author |
Message |
darton Op
Joined: 21 Jan 2006 Posts: 155
|
Posted: Wed Apr 12, 2006 9:47 am Post subject: Help with this script |
|
|
Hello!
When someone in channel writes "!warn Darton", my eggdrop should say: "!page Darton You are warned. The moderator will keep an eye on you now!"
So I made this script:
| Code: | bind pub - !warn warn
proc warn {nick uhost hand chan text} {
putquick "PRIVMSG $chan :!page $text You are warned. The moderator will keep an eye on you now!"
} |
This thing works, but it must be pubm and not only pub. With pubm it doesn't work. Can anybody modify this script so that it works with pubm? |
|
| Back to top |
|
 |
DragnLord Owner

Joined: 24 Jan 2004 Posts: 711 Location: C'ville, Virginia, USA
|
Posted: Wed Apr 12, 2006 12:23 pm Post subject: pubm |
|
|
Why do you "need" this to be pubm?
Pubm would return the whole line for $text, not just what comes after the trigger.
Can you show some examples of what you are trying to do with it? The example you gave for pub really wouldn't apply with the way pubm works. |
|
| Back to top |
|
 |
darton Op
Joined: 21 Jan 2006 Posts: 155
|
Posted: Wed Apr 12, 2006 2:20 pm Post subject: |
|
|
OK, my channel is connected to a game which means that everything what is displayed in game is also displayed in the channel. A bot named BRenBot displays everything in the channel. Here is a example what I want to do with my script:
| Quote: | (08:14:44) (@BRenBot) Darton: !warn nick
|
You see that before the "!warn nick" there is a player name, accordingly a bind to pub wouldn't work. Now I want that my bot ignores everything what is before "!warn". And when somebody writes "!warn nick", my bot should say: "!page nick You are warned. The moderator will keep an eye on you now!" |
|
| Back to top |
|
 |
DragnLord Owner

Joined: 24 Jan 2004 Posts: 711 Location: C'ville, Virginia, USA
|
Posted: Wed Apr 12, 2006 3:17 pm Post subject: |
|
|
Give this a try (worked for me):
| Code: |
bind pubm - "*!warn *" warn
proc warn {nick uhost hand chan text} {
set wout [lrange $text 2 end]
putquick "PRIVMSG $chan :!page $wout You are warned. The moderator will keep an eye on you now!"
}
|
|
|
| Back to top |
|
 |
darton Op
Joined: 21 Jan 2006 Posts: 155
|
Posted: Wed Apr 12, 2006 4:09 pm Post subject: |
|
|
| Hey, thank you guy. It works like a charm. |
|
| Back to top |
|
 |
DragnLord Owner

Joined: 24 Jan 2004 Posts: 711 Location: C'ville, Virginia, USA
|
Posted: Wed Apr 12, 2006 4:14 pm Post subject: |
|
|
glad to help when/where I can for someone that is at least trying
 |
|
| Back to top |
|
 |
|