egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Help with this script

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help
View previous topic :: View next topic  
Author Message
darton
Op


Joined: 21 Jan 2006
Posts: 155

PostPosted: Wed Apr 12, 2006 9:47 am    Post subject: Help with this script Reply with quote

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
View user's profile Send private message
DragnLord
Owner


Joined: 24 Jan 2004
Posts: 711
Location: C'ville, Virginia, USA

PostPosted: Wed Apr 12, 2006 12:23 pm    Post subject: pubm Reply with quote

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
View user's profile Send private message
darton
Op


Joined: 21 Jan 2006
Posts: 155

PostPosted: Wed Apr 12, 2006 2:20 pm    Post subject: Reply with quote

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
View user's profile Send private message
DragnLord
Owner


Joined: 24 Jan 2004
Posts: 711
Location: C'ville, Virginia, USA

PostPosted: Wed Apr 12, 2006 3:17 pm    Post subject: Reply with quote

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
View user's profile Send private message
darton
Op


Joined: 21 Jan 2006
Posts: 155

PostPosted: Wed Apr 12, 2006 4:09 pm    Post subject: Reply with quote

Hey, thank you guy. It works like a charm.
Back to top
View user's profile Send private message
DragnLord
Owner


Joined: 24 Jan 2004
Posts: 711
Location: C'ville, Virginia, USA

PostPosted: Wed Apr 12, 2006 4:14 pm    Post subject: Reply with quote

glad to help when/where I can for someone that is at least trying
Smile
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber