Voiceops

From ProjectWiki
(Difference between revisions)
Jump to: navigation, search
(Source Code)
Line 1: Line 1:
 
__TOC__
 
__TOC__
Best prices for:
+
==Whats This?==
http://cheap-cialis.gokasey.com/economico-viagra-soft.html economico viagra soft
+
Eggdrop tcl script that enables otherwise powerless users with +v in a channel to kick, ban or set topics sorta providing halfops type functionality on networks limited to ops and voices (like efnet :).  
http://buy-levitra.gokasey.com/comprar-cialis-soft.html comprar cialis soft
+
Will not of course ban/kick ops! ^^
http://buy-viagra-soft.gokasey.com/compra-cialis.html compra cialis
+
http://cheap-cialis.gokasey.com/cheap-cialis-soft.html cheap cialis soft
+
http://cheap-cialis.gokasey.com/cheap-kamagra-oral-jelly.html cheap kamagra oral jelly
+
http://buy-kamagra-soft.gokasey.com/comprar-el-kamagra-soft.html comprar el kamagra soft
+
http://kamagra-soft.gokasey.com/gratuit-kamagra.html gratuit kamagra
+
http://generic-levitra.gokasey.com/generico-cialis.html generico cialis
+
http://viagra.gokasey.com/free-kamagra.html free kamagra
+
http://buy-cialis.gokasey.com/compra-viagra-soft.html compra viagra soft
+
http://cheap-viagra.gokasey.com/billig-cialis-soft.html billig cialis soft
+
http://cheap-levitra.gokasey.com/economico-kamagra.html economico kamagra
+
http://kamagra.gokasey.com/gratuit-cialis.html gratuit cialis
+
http://viagra.gokasey.com/gratuit-kamagra-oral-jelly.html gratuit kamagra oral jelly
+
http://viagra-soft.gokasey.com/free-levitra.html free levitra
+
  
Great discounts:
+
After copying to your scripts directory and adding to the bot's config file type:
http://cheap-kamagra.gokasey.com/cheap-kamagra-soft.html cheap kamagra soft
+
.chanset #somechannel +voiceops
http://kamagra.gokasey.com/libero-viagra-soft.html libero viagra soft
+
to activate for that channel
http://levitra.gokasey.com/frei-viagra-soft.html frei viagra soft
+
http://buy-viagra-soft.gokasey.com/comprar-levitra.html comprar levitra
+
http://generic-cialis.gokasey.com/generico-kamagra.html generico kamagra
+
http://buy-cialis-soft.gokasey.com/acheter-kamagra-oral-jelly.html acheter kamagra oral jelly
+
http://cheap-kamagra.gokasey.com/billig-levitra.html billig levitra
+
http://generic-cialis.gokasey.com/generika-viagra-soft.html generika viagra soft
+
http://levitra.gokasey.com/free-viagra.html free viagra
+
http://viagra-soft.gokasey.com/gratuit-cialis-soft.html gratuit cialis soft
+
http://kamagra.gokasey.com/libre-kamagra-soft.html libre kamagra soft
+
http://buy-viagra-soft.gokasey.com/acheter-viagra-soft.html acheter viagra soft
+
http://cheap-kamagra.gokasey.com/cheap-viagra-soft.html cheap viagra soft
+
http://buy-viagra-soft.gokasey.com/acheter-viagra.html acheter viagra
+
http://levitra.gokasey.com/libero-cialis-soft.html libero cialis soft
+
  
best discount pills:
+
==To Do==
http://viagra.gokasey.com/frei-kamagra-oral-jelly.html frei kamagra oral jelly
+
<s>Allow setting a channel flag on the bot to enable voiceops for that channel.</s> DONE!! 2008.09.18 :D
http://buy-cialis.gokasey.com/comprar-el-levitra.html comprar el levitra
+
 
http://buy-cialis.gokasey.com/acheter-viagra.html acheter viagra
+
Help could be a bit more verbose explaining which arguments are accepted
http://buy-cialis-soft.gokasey.com/comprar-viagra-soft.html comprar viagra soft
+
 
http://generic-kamagra-soft.gokasey.com/generico-levitra.html generico levitra
+
==Source Code==
http://buy-levitra.gokasey.com/acheter-cialis.html acheter cialis
+
Either download this:
http://viagra.gokasey.com/frei-levitra.html frei levitra
+
[http://blea.ch/~eris/litter/voiceops.tcl.txt voiceops.tcl.txt]
http://buy-cialis-soft.gokasey.com/acheter-levitra.html acheter levitra
+
Or copy/paste this:
http://cheap-viagra.gokasey.com/economico-viagra-soft.html economico viagra soft
+
 
http://generic-viagra.gokasey.com/generico-kamagra-oral-jelly.html generico kamagra oral jelly
+
<source lang="tcl">
http://buy-viagra.gokasey.com/compra-kamagra.html compra kamagra
+
#############
http://generic-kamagra.gokasey.com/generico-kamagra.html generico kamagra
+
# Voiceops.tcl - lets +v or +o users !kick !topic !ban !unban !invite
http://buy-kamagra.gokasey.com/buy-kamagra.html buy kamagra
+
# .chanset #somechannel +voiceops to activate
http://buy-levitra.gokasey.com/buy-viagra.html buy viagra
+
# voice'd users may type !voiceops for help
http://cheap-kamagra.gokasey.com/billig-kamagra.html billig kamagra
+
# enjoys \^_^/!!!!
http://buy-cialis-soft.gokasey.com/comprar-kamagra-soft.html comprar kamagra soft
+
 
http://cheap-kamagra.gokasey.com/billig-cialis-soft.html billig cialis soft
+
 
http://buy-kamagra-soft.gokasey.com/buy-viagra-soft.html buy viagra soft
+
#bindings go here, change if u wish
http://kamagra.gokasey.com/libero-kamagra-soft.html libero kamagra soft
+
bind pub - "!kick" pub:kick
http://viagra.gokasey.com/libero-levitra.html libero levitra
+
bind pub - "!topic" pub:topic
http://buy-viagra.gokasey.com/comprar-viagra-soft.html comprar viagra soft
+
bind pub - "!ban" pub:ban
http://generic-kamagra.gokasey.com/generika-kamagra-soft.html generika kamagra soft
+
bind pub - "!unban" pub:unban
http://kamagra-soft.gokasey.com/libre-levitra.html libre levitra
+
bind pub - "!invite" pub:invite
http://kamagra.gokasey.com/gratuit-kamagra-oral-jelly.html gratuit kamagra oral jelly
+
bind pub - "!+m" pub:moderate
http://kamagra.gokasey.com/libero-kamagra-oral-jelly.html libero kamagra oral jelly
+
bind pub - "!-m" pub:unmoderate
 +
bind pub - "!+i" pub:plusi
 +
bind pub - "!-i" pub:minusi
 +
bind pub - "!lockdown" pub:lockdown
 +
bind pub - "!release" pub:release
 +
bind pub - "!voiceops" pub:voiceopshelp
 +
setudef flag voiceops
 +
 
 +
putlog "voiceop.tcl loaded! :P"
 +
 
 +
#function to make sure the user is voiced or opped, and this channel supports voiceop
 +
proc voiceop:validuser {nick chan} {
 +
  if {([isop $nick $chan] || [isvoice $nick $chan]) && ([channel get $chan voiceops])} {
 +
    return 1
 +
  } else {
 +
    return 0
 +
  }
 +
}
 +
 
 +
#Help me erin!!!
 +
proc pub:voiceopshelp {nick host hand chan text} {
 +
  if {[voiceop:validuser $nick $chan]} {
 +
    puthelp "PRIVMSG $chan :Valid commands are: !kick !topic !ban !unban !invite !+m !-m !+i !-i !lockdown (moderate+invite) !release (terminate lockdown mode)"
 +
  } 
 +
}
 +
 
 +
#invite a user to channel
 +
proc pub:invite {nick host hand chan text} {
 +
  set whom [lindex $text 0]
 +
  if {[voiceop:validuser $nick $chan]} {
 +
    if {[onchan $whom $chan]} {
 +
      puthelp "PRIVMSG $chan :$nick, are u blind?! $whom is already in $chan! :P"
 +
    } else {
 +
      puthelp "PRIVMSG $chan :inviting $whom to $chan..."
 +
      puthelp "INVITE $whom $chan"
 +
      putlog "$nick invited $whom to $chan"
 +
    }
 +
  }
 +
}
 +
 
 +
#lockdown channel (set chanmode +im)
 +
proc pub:lockdown {nick host hand chan text} {
 +
  if {[voiceop:validuser $nick $chan]} {
 +
    putlog "$nick locked down $chan"
 +
    puthelp "MODE $chan +m+i"
 +
    puthelp "PRIVMSG $chan :channel in lockdown mode use !release to clear"
 +
  }
 +
}
 +
 
 +
#release lockdown'd channel (set chanmode -im)
 +
proc pub:release {nick host hand chan text} {
 +
  if {[voiceop:validuser $nick $chan]} {
 +
    putlog "$nick unlocked down $chan"
 +
    puthelp "MODE $chan -m-i"
 +
  }
 +
}
 +
 
 +
#make channel invite only
 +
proc pub:plusi {nick host hand chan text} {
 +
  if {[voiceop:validuser $nick $chan]} {
 +
    putlog "$nick made $chan invite only"
 +
    puthelp "MODE $chan +i"
 +
  }
 +
}
 +
 
 +
#moderate channel
 +
proc pub:minusi {nick host hand chan text} {
 +
  if {[voiceop:validuser $nick $chan]} {
 +
    putlog "$nick set $chan -i"
 +
    puthelp "MODE $chan -i"
 +
  }
 +
}
 +
 
 +
#moderate channel
 +
proc pub:moderate {nick host hand chan text} {
 +
  if {[voiceop:validuser $nick $chan]} {
 +
    putlog "$nick moderated $chan"
 +
    puthelp "MODE $chan +m"
 +
  }
 +
}
 +
 
 +
#unmoderate channel
 +
proc pub:unmoderate {nick host hand chan text} {
 +
  if {[voiceop:validuser $nick $chan]} {
 +
    putlog "$nick unmoderated $chan"
 +
    puthelp "MODE $chan -m"
 +
  }
 +
}
 +
 
 +
#remove a ban from a channel
 +
proc pub:unban {nick host hand chan text} {
 +
  set hostmask [lindex $text 0]
 +
  if {[voiceop:validuser $nick $chan]} {
 +
    putlog "$nick removed ban $hostmask from $chan"
 +
    puthelp "MODE $chan -b $hostmask"
 +
  }
 +
}
 +
 
 +
#ban a user from channel
 +
proc pub:ban {nick host hand chan text} {
 +
  set whom [lindex $text 0]
 +
  if {[voiceop:validuser $nick $chan]} {
 +
    set bhost [getchanhost $whom $chan]
 +
    if {[onchan $whom $chan]} {
 +
      if {![isop $whom $chan]} {
 +
        putserv "MODE $chan +b *!$bhost"
 +
        pub:kick $nick $host $hand $chan $text
 +
        putlog "$nick banned $whom on $chan"
 +
      } else {
 +
        puthelp "PRIVMSG $chan :nowai i'm banin' an op!!!"
 +
      }
 +
    } else {
 +
      puthelp "PRIVMSG $chan :$nick $whom is not on $chan"
 +
    }
 +
  }
 +
}
 +
 
 +
#change channel topic
 +
proc pub:topic {nick host hand chan text} {
 +
  if {[voiceop:validuser $nick $chan]} {
 +
    putserv "TOPIC $chan :$text"
 +
    putlog "$nick changed topic to $text on $chan"
 +
  }
 +
}
 +
 
 +
#kick user from channel
 +
proc pub:kick {nick host hand chan text} {
 +
  set whom [lindex $text 0]
 +
  set reason [lrange $text 1 end]
 +
  if {[voiceop:validuser $nick $chan]} {
 +
    if {[onchan $whom $chan]} {
 +
      if {![isop $whom $chan]} {
 +
        putserv "KICK $chan $whom :$reason"
 +
        putlog "$nick kicked $whom from $chan"
 +
      } else {
 +
        puthelp "PRIVMSG $chan :nowai i'm kickin' an op!!!"
 +
      }
 +
    } else {
 +
      puthelp "PRIVMSG $chan :$nick $whom is not on $chan"
 +
    }
 +
  }
 +
}
 +
</source>

Revision as of 17:45, 17 June 2009

Contents

Whats This?

Eggdrop tcl script that enables otherwise powerless users with +v in a channel to kick, ban or set topics sorta providing halfops type functionality on networks limited to ops and voices (like efnet :). Will not of course ban/kick ops! ^^

After copying to your scripts directory and adding to the bot's config file type:

.chanset #somechannel +voiceops

to activate for that channel

To Do

Allow setting a channel flag on the bot to enable voiceops for that channel. DONE!! 2008.09.18 :D

Help could be a bit more verbose explaining which arguments are accepted

Source Code

Either download this: voiceops.tcl.txt Or copy/paste this:

#############
# Voiceops.tcl - lets +v or +o users !kick !topic !ban !unban !invite
# .chanset #somechannel +voiceops to activate
# voice'd users may type !voiceops for help
# enjoys \^_^/!!!!
 
 
#bindings go here, change if u wish
bind pub - "!kick" pub:kick
bind pub - "!topic" pub:topic
bind pub - "!ban" pub:ban
bind pub - "!unban" pub:unban
bind pub - "!invite" pub:invite
bind pub - "!+m" pub:moderate
bind pub - "!-m" pub:unmoderate
bind pub - "!+i" pub:plusi
bind pub - "!-i" pub:minusi
bind pub - "!lockdown" pub:lockdown
bind pub - "!release" pub:release
bind pub - "!voiceops" pub:voiceopshelp
setudef flag voiceops
 
putlog "voiceop.tcl loaded! :P"
 
#function to make sure the user is voiced or opped, and this channel supports voiceop
proc voiceop:validuser {nick chan} {
  if {([isop $nick $chan] || [isvoice $nick $chan]) && ([channel get $chan voiceops])} {
    return 1
  } else {
    return 0
  }
}
 
#Help me erin!!! 
proc pub:voiceopshelp {nick host hand chan text} {
  if {[voiceop:validuser $nick $chan]} {
    puthelp "PRIVMSG $chan :Valid commands are: !kick !topic !ban !unban !invite !+m !-m !+i !-i !lockdown (moderate+invite) !release (terminate lockdown mode)"
  }  
}
 
#invite a user to channel
proc pub:invite {nick host hand chan text} {
  set whom [lindex $text 0]
  if {[voiceop:validuser $nick $chan]} {
    if {[onchan $whom $chan]} { 
      puthelp "PRIVMSG $chan :$nick, are u blind?! $whom is already in $chan! :P"
    } else {
      puthelp "PRIVMSG $chan :inviting $whom to $chan..."
      puthelp "INVITE $whom $chan"
      putlog "$nick invited $whom to $chan"
    }
  }
}
 
#lockdown channel (set chanmode +im)
proc pub:lockdown {nick host hand chan text} {
  if {[voiceop:validuser $nick $chan]} {
    putlog "$nick locked down $chan"
    puthelp "MODE $chan +m+i"
    puthelp "PRIVMSG $chan :channel in lockdown mode use !release to clear"
  }
}
 
#release lockdown'd channel (set chanmode -im)
proc pub:release {nick host hand chan text} {
  if {[voiceop:validuser $nick $chan]} {
    putlog "$nick unlocked down $chan"
    puthelp "MODE $chan -m-i"
  }
}
 
#make channel invite only
proc pub:plusi {nick host hand chan text} {
  if {[voiceop:validuser $nick $chan]} {
    putlog "$nick made $chan invite only"
    puthelp "MODE $chan +i"
  }
}
 
#moderate channel
proc pub:minusi {nick host hand chan text} {
  if {[voiceop:validuser $nick $chan]} {
    putlog "$nick set $chan -i"
    puthelp "MODE $chan -i"
  }
}
 
#moderate channel
proc pub:moderate {nick host hand chan text} {
  if {[voiceop:validuser $nick $chan]} {
    putlog "$nick moderated $chan"
    puthelp "MODE $chan +m"
  }
}
 
#unmoderate channel
proc pub:unmoderate {nick host hand chan text} {
  if {[voiceop:validuser $nick $chan]} {
    putlog "$nick unmoderated $chan"
    puthelp "MODE $chan -m"
  }
}
 
#remove a ban from a channel
proc pub:unban {nick host hand chan text} {
  set hostmask [lindex $text 0]
  if {[voiceop:validuser $nick $chan]} {
    putlog "$nick removed ban $hostmask from $chan"
    puthelp "MODE $chan -b $hostmask"
  }
}
 
#ban a user from channel
proc pub:ban {nick host hand chan text} {
  set whom [lindex $text 0]
  if {[voiceop:validuser $nick $chan]} {
    set bhost [getchanhost $whom $chan]
    if {[onchan $whom $chan]} {
      if {![isop $whom $chan]} {
        putserv "MODE $chan +b *!$bhost"
        pub:kick $nick $host $hand $chan $text
        putlog "$nick banned $whom on $chan"
      } else {
        puthelp "PRIVMSG $chan :nowai i'm banin' an op!!!"
      }
    } else {
      puthelp "PRIVMSG $chan :$nick $whom is not on $chan"
    }
  }
}
 
#change channel topic
proc pub:topic {nick host hand chan text} {
  if {[voiceop:validuser $nick $chan]} {
    putserv "TOPIC $chan :$text"
    putlog "$nick changed topic to $text on $chan"
  }
}
 
#kick user from channel
proc pub:kick {nick host hand chan text} {
  set whom [lindex $text 0]
  set reason [lrange $text 1 end]
  if {[voiceop:validuser $nick $chan]} {
    if {[onchan $whom $chan]} {
      if {![isop $whom $chan]} {
        putserv "KICK $chan $whom :$reason"
        putlog "$nick kicked $whom from $chan"
      } else {
        puthelp "PRIVMSG $chan :nowai i'm kickin' an op!!!"
      }
    } else {
      puthelp "PRIVMSG $chan :$nick $whom is not on $chan"
    }
  }
}
Personal tools
irssi scripts
eggdrop scripts