This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

Need a script to say certain things to channel

Old posts that have not been replied to for several years.
Locked
F
Friischling

Need a script to say certain things to channel

Post by Friischling »

Hello there

I need a script which makes the bot say a certain linie whenever a person gets OP in a certain channel.
But only when the OP is given by Q/L og the bot itself

Furthermore it shall Greet certain users when they join the channel. The greeting have to be in the channel - not as a notice

I have tried with +greet, but it doesn't seem to work :(

Thx in advantage
s
soul
Voice
Posts: 31
Joined: Fri Apr 25, 2003 6:25 pm
Location: Portugal

Post by soul »

set chan "#change_the_channel_here"

bind mode - * onop
proc onop {nick uhost hand chan +o victim} {
if { $nick == "Q" || $nick == "L" } {
putserv "privmsg $chan :$victim : text here!"
}
}
putlog "anything_you_want.tcl"

the script above will message the channel if Q or L op any nick in channel
###

for greeting certain users : .chanset #channel +greet
and check your conf for +greet

enjoy,
i'll believe in justice when the pope is accused {
if {$true == "$censured" }{return nothing}}
F
Friischling

Post by Friischling »

Thx alot :D

Unfortunately the message appears everytime a user joins and they get +v or +o
It was ment to be +o only. Is there any way to make it do this ?

I have never scripted in TCL - which makes me a newbie :)
User avatar
caesar
Mint Rubber
Posts: 3778
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

Try with:

Code: Select all

bind mode - "* +o" onop
also, replace the:

Code: Select all

if { $nick == "Q" || $nick == "L" } { 
with:

Code: Select all

if {[string toupper $nick] == "Q" || [string toupper $nick] == "L"} {
Once the game is over, the king and the pawn go back in the same box.
s
soul
Voice
Posts: 31
Joined: Fri Apr 25, 2003 6:25 pm
Location: Portugal

Post by soul »

i've always appreciated scripters
i'll believe in justice when the pope is accused {
if {$true == "$censured" }{return nothing}}
Locked