| View previous topic :: View next topic |
| Author |
Message |
dumbro Voice
Joined: 21 May 2006 Posts: 8
|
Posted: Sat May 27, 2006 6:02 pm Post subject: topic script |
|
|
i tryed to find... i tryed to edit myself... but i cant find this..
Eggdrop set topic to something... i do like !set topic bleubleu * bleubleu....
when i write !topic testing , the eggdrop change it to bleubleu testing bleubleu .... |
|
| Back to top |
|
 |
De Kus Revered One

Joined: 15 Dec 2002 Posts: 1361 Location: Germany
|
Posted: Sun May 28, 2006 7:15 am Post subject: |
|
|
| Code: | bind o|o !settopic settopic
bind o|o !topic topicchange
proc settopic {nick uhost hand chan topic} {
set ::topicproto($chan) $topic
return 1
}
proc topicchange {nick uhost hand chan topic} {
if {[info exists ::topicproto($chan)]} {
if {[botisop] || [botishalfop]} {
putserv "TOPIC $chan :[string map [list * $topic] $::topicproto($chan)]"
return 1
} else {
puthelp "NOTICE $nick :Sorry, I don't have ops."
}
} else {
puthelp "NOTICE $nick :You must set the prototype with !settopic first."
}
return 0
} |
Notes:
if the prototype contains more than one *, every * will be replaced with the same argument. However, you can replace the the * with any other character. You could even use a non readable character or a string like "INSERT HERE".
The prototype gets reset on every restart (not rehash) of the bot, since the array is not saved to disc ^-^.
Change o|o to what every priviliges it should be limited to.
Script is untested and might therefore contain either typos or stupid logical mistakes . _________________ De Kus
StarZ|De_Kus, De_Kus or DeKus on IRC
Copyright © 2005-2009 by De Kus - published under The MIT License
Love hurts, love strengthens... |
|
| Back to top |
|
 |
dumbro Voice
Joined: 21 May 2006 Posts: 8
|
Posted: Sun May 28, 2006 2:09 pm Post subject: |
|
|
thx very much! your great guys  |
|
| Back to top |
|
 |
|