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.

Topic script

Old posts that have not been replied to for several years.
Locked
A
Adis_18

Topic script

Post by Adis_18 »

Is there a topic script for eggdrops that kinda looks like this
if i type !topic something bot changes topic and if I type !topic hello it changes topic to Something (nickname who posted topic) || hello (nickname) ?
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

ok it'll be something like this :

Code: Select all

bind pubm o|o "!topic" topic

proc topic {nick uhost hand chan text} { 
    set text [lindex [split $text] 0]
    if {$text == ""} {
        set person $topic
    }
    putserv "TOPIC $chan :$topic"
}
I think this would work, I'd be very proud if it worked :P
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

or no wait...
i think that one will make conflicts
use this one:

Code: Select all

bind pubm o|o "!topic" topic 

proc topic {nick uhost hand chan text} { 
    set ntopic [lindex [split $text] 0] 
    if {$ntopic == ""} { 
        set ntopic $topic 
    } 
    putserv "TOPIC $chan :$topic" 
}[code]
this one will make no errors... but I'm not sure if it'll work
Locked