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.
Requests for complete scripts or modifications/fixes for scripts you didn't write. Response not guaranteed, and no thread bumping!
janipewter
Voice
Posts: 16 Joined: Sun Jan 22, 2006 8:59 pm
Post
by janipewter » Thu Feb 16, 2006 12:20 pm
Currently I've got a kind-of news script being run from a mirc bot, but I wanted to put it on my eggdrop instead. Anyone know the equivelant in tcl language?
Code: Select all
on *:text:!news:#: { /msg $chan News: %news }
on *:TEXT:!setnews*:#:if ($nick isop $chan) { /set %news $2- }
Bascially an op can do !setnews <news> and the bot remembers it, and then anyone can do !news and it will relay News: <whatever op has set>
Thanks, Jani.
Sir_Fz
Revered One
Posts: 3794 Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:
Post
by Sir_Fz » Thu Feb 16, 2006 12:34 pm
Code: Select all
set news "no news set"
bind pub - !news news
bind pub - !setnews setnews
proc news {nick uhost hand chan arg} {
puthelp "privmsg $chan :News: $::news"
}
proc setnews {nick uhost hand chan arg} {
if {[isop $nick $chan]} {
set ::news [join [lrange [split $arg] 0 end]]
}
}
janipewter
Voice
Posts: 16 Joined: Sun Jan 22, 2006 8:59 pm
Post
by janipewter » Thu Feb 16, 2006 12:43 pm
Thanks very much
What about making it only work on #cows for example?
Sir_Fz
Revered One
Posts: 3794 Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:
Post
by Sir_Fz » Thu Feb 16, 2006 12:49 pm
add
Code: Select all
if {![string equal -nocase #cows $chan]} {return 0}
to the procs.
janipewter
Voice
Posts: 16 Joined: Sun Jan 22, 2006 8:59 pm
Post
by janipewter » Thu Feb 16, 2006 12:51 pm
You are awesome.
Thanks so much.