Thread: Admin ON/OFF
View Single Post
Old 26-01-2006, 19:23   #5 (permalink)
arcade
TCB & Ratings projects Member, #Mythic representative
 
arcade's Avatar
 
Join Date: Jun 2004
Location: In fatza calculatorului!!
Age: 19
Posts: 218
Rep Power: 37
arcade is on a distinguished road
Send a message via Yahoo to arcade
Default

GoRaPiD uite aici special pt tine un cod cu ce vroiai tu si un mic supliment:
Code:
bind pub vfg|- !helper pub:helper
bind pub m|- !admin pub:admin
bind pub -|- !admini pub:admini
bind join - * admin:check

setudef flag admins

proc pub:helper {nick uhost hand channel arg} {
  switch [string tolower [lindex $arg 0]] {
    "on"       { chattr $hand +h; puthelp "NOTICE $nick :Ti-ai setat statusul online." }
    "off"       { chattr $hand -h; puthelp "NOTICE $nick :Ti-ai setat statusul offline." }
    }
}

proc pub:admin {nick uhost hand channel arg} {
  switch [string tolower [lindex $arg 0]] {
    "on"       { chattr $hand +O; puthelp "NOTICE $nick :Ti-ai setat statusul online." }
    "off"       { chattr $hand -O; puthelp "NOTICE $nick :Ti-ai setat statusul offline." }
    }
}



proc admin:check {nick uhost hand chan} {
   global schan
   if {![channel get $chan admins]} {return}
   
   set admins ""
   foreach u [userlist vl-b|vl $chan] {
                if {[handonchan $u $chan]} {lappend admins "[hand2nick $u $chan],"}
   }
   if {![llength $admins]} {puthelp "NOTICE $nick :Momentan Nici Un HELPER ON-Line"; puthelp "NOTICE $nick :At the moment there is no HELPER ON-Line" } {puthelp "NOTICE $nick :Helperii online sunt: [string trimright $admins ","]"; puthelp "NOTICE $nick :Online helpers are: [string trimright $admins ","]" }
}
  
proc pub:admini {nick uhost hand chan arg} {
  
  set admins ""
  foreach u [userlist O|- $chan] {
  lappend admins "[hand2nick $u $chan],"
   }
   if {![llength $admins]} {puthelp "NOTICE $nick :Momentan Nici Un ADMIN ON-Line" } {puthelp "NOTICE $nick :Adminii online sunt: [string trimright $admins ","]" }
}
in afara de comanda !helper on/off mai e si comanda !admin on/off kre la tastarea comenzii !admini afiseaza lista cu admini kre sunt on.
Pt a arata helperii online pe consola scrieti: .chanset #chan +admins
arcade is offline   Reply With Quote