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:
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?
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.
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:
(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!"
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!"
}