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 

topic script

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests
View previous topic :: View next topic  
Author Message
dumbro
Voice


Joined: 21 May 2006
Posts: 8

PostPosted: Sat May 27, 2006 6:02 pm    Post subject: topic script Reply with quote

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
View user's profile Send private message
De Kus
Revered One


Joined: 15 Dec 2002
Posts: 1361
Location: Germany

PostPosted: Sun May 28, 2006 7:15 am    Post subject: Reply with quote

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 Smile.
_________________
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
View user's profile Send private message MSN Messenger
dumbro
Voice


Joined: 21 May 2006
Posts: 8

PostPosted: Sun May 28, 2006 2:09 pm    Post subject: Reply with quote

thx very much! your great guys 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 -> Script Requests 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