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 

modif tcl

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    egghelp.org community Forum Index -> Archive
View previous topic :: View next topic  
Author Message
Ulrik
Voice


Joined: 29 Sep 2005
Posts: 1

PostPosted: Thu Sep 29, 2005 9:09 am    Post subject: modif tcl Reply with quote

Hi!
how to change it tcl for use all channel and authorized m|m has op / deop

thx all help and sorry for my English..

Code:

#put here the channel that the bot must protect
set prochan "#loldelol"

bind mode - *-o* deop
 proc deop {nick uhost hand chan args} {
  global botnick home servicename prochan
  set dnick [lindex $args 1]
  if {$chan == $prochan} {
  if {$dnick == $botnick} {
  putserv "NOTICE $nick :your deop of the bot has been logged !!"
  putchan $home "$nick deoped me on $chan" }
  if {$nick == $botnick} {
  putchan $chan "i'm sorry i have to do this ..." } else {
  putserv "MODE $chan -o $nick"
  putserv "MODE $chan +o $dnick" }
  } else {
  return 1 }
 return 1
}

bind mode - *+o* op
 proc op {nick uhost hand chan args} {
  global botnick home servicename prochan
  set dnick [lindex $args 1]
  if {$chan == $prochan} {
  if {$dnick == $botnick} {
  putchan $chan "wel i can't say no ... tnx dude !"
  return 1 }
  if {$nick == $botnick} {
  putchan $chan "now say tnx !!!" } else {
  putserv "MODE $chan -o $dnick" }
  } else {
  return 1 }
 return 1
}"
Back to top
View user's profile Send private message
De Kus
Revered One


Joined: 15 Dec 2002
Posts: 1361
Location: Germany

PostPosted: Thu Sep 29, 2005 12:47 pm    Post subject: Reply with quote

not sure what you mean about the m|m thing, but for the channel thing you need to remeve the '$chan == $prochan' condition. in case you want masters to be not logged/punished replace '$chan == $prochan' with '![matchattr $hand m|m $chan]'.

PS: post code in [code] tags, otherwise whitespaces are beeing collapsed by the web browser that destroys code formating.

PPS: the code is ugly anyway, you shouldn't learn from such Very Happy.
_________________
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
Alchera
Revered One


Joined: 11 Aug 2003
Posts: 3344
Location: Ballarat Victoria, Australia

PostPosted: Thu Sep 29, 2005 7:14 pm    Post subject: Reply with quote

Quote:
bind <type> <flags> <keyword/mask> [proc-name]

flags are the flags the user must have to trigger the event (if applicable).


Example:
Code:
bind mode m|m +o op
bind mode m|m -o op


For further assistance on flags, via the Command Console:
Code:
.help whois

_________________
Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    egghelp.org community Forum Index -> Archive 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