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.

modif tcl

Old posts that have not been replied to for several years.
Locked
U
Ulrik
Voice
Posts: 1
Joined: Thu Sep 29, 2005 9:01 am

modif tcl

Post by Ulrik »

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: Select all

#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 
}"
User avatar
De Kus
Revered One
Posts: 1361
Joined: Sun Dec 15, 2002 11:41 am
Location: Germany

Post by De Kus »

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: Select all

 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 :D.
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...
User avatar
Alchera
Revered One
Posts: 3344
Joined: Mon Aug 11, 2003 12:42 pm
Location: Ballarat Victoria, Australia
Contact:

Post by Alchera »

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

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

Code: Select all

bind mode m|m +o op
bind mode m|m -o op
For further assistance on flags, via the Command Console:

Code: Select all

.help whois
Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM
Locked