botlending forum  

Go Back   botlending forum > Eggdrop & TCL > Tcl scripting

Tcl scripting Tcl scripting related questions

Reply
 
LinkBack Thread Tools Display Modes
Old 28-12-2005, 17:26   #1 (permalink)
Junior Member
 
Tovarashii's Avatar
 
Join Date: Aug 2005
Location: Radauti, Jud. Suceava
Age: 25
Posts: 12
Rep Power: 0
Tovarashii is an unknown quantity at this point
Send a message via MSN to Tovarashii Send a message via Yahoo to Tovarashii Send a message via Skype™ to Tovarashii
Exclamation Admin ON/OFF

tot eu vin cu o idee care sper sa se si poatea rezolva... as avea nevoie de un tcl prin care Eggdrop`u sa dea mesaj de greet cand intra cineva pe canal de forma: Momentan Nici Un ADMIM ON-Line / For The Moment NO GM ON-Line... problema nu`i aici... problema este ca atunci cand eu dau access la eggdrop si el intrea pe canal... se logheaza la el... urmatoare`i persoane care intra pe canal sa`i apara mesajul Admini ON-Line Sunt: xxx unde xxx este nick`ul celui care are access la eggdrop... si asa mai departe... la iesirea lui de pe canal, si anume a celui care este admin eggdropul sa isi seteze automat mesajul de greet cel mentionat mai sus si anume Momentan Nici Un ADMIM ON-Line / For The Moment NO GM ON-Line

cred ca am explicat cam ce as dori... daca cineva nu a inteles... o sa incer sa reformulez totul ca sa fie mai inteles... ok?

Multumesc pentru intelegere!! Basfta celor care incearca sa`l faca

Last edited by Tovarashii; 29-12-2005 at 00:16.
Tovarashii is offline   Reply With Quote
Old 29-12-2005, 01:26   #2 (permalink)
TCB & Ratings projects Member, #Mythic representative
 
arcade's Avatar
 
Join Date: Jun 2004
Location: In fatza calculatorului!!
Age: 19
Posts: 221
Rep Power: 37
arcade is on a distinguished road
Send a message via Yahoo to arcade
Default

uite si ce mi-ai cerut tu sa iti fac. Cam asa arata:
Code:
bind join - * admin:join
bind join - * user:join
bind part - * admin:part

setudef str adminstatus
setudef flag admin

proc admin:join {nick uhost hand chan} {

	set adminstatus [channel get $chan adminstatus]

	if {[matchattr $hand m|m $chan] } {
	if {$adminstatus == ""} {channel set $chan adminstatus $nick } else {
      if {![string match *$nick* $adminstatus]} {
      set admins "$adminstatus $nick" }
	channel set $chan adminstatus $admins }
	}
}


proc user:join {nick uhost hand chan} {

	set admins  [channel get $chan adminstatus]

	if {$admins != ""} {
	puthelp "NOTICE $nick :Adminii online sunt: $admins" } else {
	puthelp "NOTICE $nick :Nu este nici un admin online" }
}


proc admin:part {nick uhost hand chan {msg ""}} {

	set adminstatus [channel get $chan adminstatus]

	if {[matchattr $hand m|m $chan] } {
	set a [lsearch $adminstatus $nick]
	set final [lreplace $adminstatus $a $a]
	channel set $chan adminstatus $final }
}


putlog "Admins online script by arcADE loaded"
suggestii observatii please postati.
arcade is offline   Reply With Quote
Old 29-12-2005, 10:55   #3 (permalink)
lsn
Member
 
lsn's Avatar
 
Join Date: Jun 2004
Location: In the NeXuS
Posts: 160
Rep Power: 37
lsn will become famous soon enough
Default

hai sa incercam ceva mai simplu .......
Code:
set schan "#bla"
bind join - * admin:check
proc admin:check {nick uhost hand chan} {
   global schan
   if {![string equal -nocase $chan $schan]} {return}
   if { [matchattr $hand vl|vl $chan]} {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 :Nu este nici un admin online ....."} {puthelp "NOTICE $nick :Adminii online sunt: [string trimright $admins ","] ....."}
}
lsn is offline   Reply With Quote
Old 29-12-2005, 12:15   #4 (permalink)
Senior Member
 
GoRaPiD's Avatar
 
Join Date: Jun 2004
Location: In pat cu avatarul meu
Age: 20
Posts: 259
Rep Power: 0
GoRaPiD is an unknown quantity at this point
Send a message via Yahoo to GoRaPiD
Default

Da dar daca eu ditamai +N global intru si nu am chef de help ? cel mai bine este cu comanda de genu : !helper on sau !admin on , pt ca asa intra orice helper pe net de ex dar n-are chef de help , sau are bnc , daca are bnc la ce ajuta join part ? ca acolo o sa arate ca e on dar bnc are idle 2 zile si nu rezolvati nimica
__________________
Forza RAPID ALE ALEEEEEEEEEEEEEEEEEEEEEEe
GoRaPiD is offline   Reply With Quote
Old 26-01-2006, 19:23   #5 (permalink)
TCB & Ratings projects Member, #Mythic representative
 
arcade's Avatar
 
Join Date: Jun 2004
Location: In fatza calculatorului!!
Age: 19
Posts: 221
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
Old 05-02-2006, 13:12   #6 (permalink)
Member
 
caesar's Avatar
 
Join Date: Dec 2004
Location: Under a rock!
Posts: 116
Rep Power: 32
caesar will become famous soon enough
Default

Code:
bind pub vfg|- !helper helper:set
bind pub m|- !admin admin:set

bind pub -|- !admini pub:admini
bind join - * admin:check

setudef flag admins

proc helper:set {nick uhost hand channel txt} {
  if {![channel get $channel admins]} return
  switch [set mode [string tolower [lindex [split $txt] 0]]] {
    "on" {
      chattr $hand +h;
      putserv "NOTICE $nick :Ti-ai setat statusul online."
    }
    "off" {
      chattr $hand -h;
      putserv "NOTICE $nick :Ti-ai setat statusul offline."
    }
    default {
      putserv "NOTICE $nick :Sorry, nu cunosc modul \002$mode\002, doar 'on' sau 'off'"
    }
  }
}

proc admin:set {nick uhost hand channel txt} {
  if {![channel get $channel admins]} return
  switch [set mode [string tolower [lindex [split $txt] 0]]] {
    "on" {
      chattr $hand +O;
      putserv "NOTICE $nick :Ti-ai setat statusul online."
    }
    "off" {
      chattr $hand -O;
      putserv "NOTICE $nick :Ti-ai setat statusul offline."
    }
    default {
      putserv "NOTICE $nick :Sorry, nu cunosc modul \002$mode\002, doar 'on' sau 'off'"
    }
  }
}

proc admin:check {nick uhost hand chan} {
  if {![channel get $chan admins] || [isbotnick $nick]} return
  if {![llength [set online [chanlist $chan vl-b|vl]]]} {
    puthelp "NOTICE $nick :Momentan nici un \002HELPER\002 online / Currently no \002HELPER\002 online.";
    } else {
    puthelp "NOTICE $nick :\002HELPERI\002 online / Online \002HELPERS\002: [join $online ","]";
  }
}

proc pub:admini {nick uhost hand chan txt} {
  if {![channel get $chan admins] || [isbotnick $nick]} return
  if {![llength [set online [chanlist $chan O|-]]]} {
    puthelp "NOTICE $nick :Momentan nici un \002ADMIN\002 online / Currently no \002ADMINS\002 online.";
    } else {
    puthelp "NOTICE $nick :\002ADMINS\002 online / Online \002ADMINS\002: [join $online ","]";
  }
}
Nu are haz sa folosesti 'userlist' si sa verifici printr-o bucla daca e pe canal sau nu cand ai direct 'chanlist' si iti face toate astea fara prea multe batai de cap.
caesar is offline   Reply With Quote
Old 05-02-2006, 13:35   #7 (permalink)
Junior Member
 
Tovarashii's Avatar
 
Join Date: Aug 2005
Location: Radauti, Jud. Suceava
Age: 25
Posts: 12
Rep Power: 0
Tovarashii is an unknown quantity at this point
Send a message via MSN to Tovarashii Send a message via Yahoo to Tovarashii Send a message via Skype™ to Tovarashii
Default

arcade la versiunea ta ai uitat sa specifici ca eggdropul nu va aratata nick`ul tau ... ca fiind admin ON`line ci doar restul adminbilor care sunt on in momentul respectiv....
Tovarashii is offline   Reply With Quote
Old 25-05-2006, 13:51   #8 (permalink)
Junior Member
 
Madalin's Avatar
 
Join Date: Oct 2004
Posts: 29
Rep Power: 0
Madalin is an unknown quantity at this point
Send a message via Yahoo to Madalin
Default

caesar am luat si eu tclul tau.. eu sunt MANGER GLOBAL ii dau !admin,helper off.. tot ma arata acolo.. i-am dat access local cuiva.. ii da !helper on merge.. il arata la cycle.. daca ii da !helper off.. ii da mesajul de notice ca la scos.. dar tot il arata daca da cycle..
Madalin is offline   Reply With Quote
Old 26-05-2006, 20:01   #9 (permalink)
Junior Member
 
Join Date: Nov 2005
Posts: 18
Rep Power: 0
KilingShadow is an unknown quantity at this point
Default Hopaa...

Ups.. o idee klumea..
As dori si eu tot ceva de genul celei lu GoRapid, dar numai ca sa mearga altcumva. Deci comenzile sa fie !admin on/off , !helper on/off , !manager on/off , iar aceste comenzi sa nu mearga de ex la helper sa dea !manager on, iar cand se da aceasta comanda pe consola sa apara un greet la botul care are acest script pe canalul de help cum ar fi Manageri online : X, Y, Z sau NONE, Admini online :... si tot asa, iar daca dau off sa se stearga din greet. Raman dator daca ma ajutati cu prb aceasta
KilingShadow is offline   Reply With Quote
Old 31-07-2006, 01:55   #10 (permalink)
Junior Member
 
Robby_14's Avatar
 
Join Date: Jul 2006
Posts: 7
Rep Power: 0
Robby_14 is an unknown quantity at this point
Default !admin helper on/off

Am gasit si eu un tcl facut de realdog dar credca are o mica gresala. Da mesaj cu helperii sau adminii care sunt on sau daca nu sunt spune ca nu sunt dar pe toate canalele pe care este botul nu numai pe canalul de help sau/si consola.

Code:
###################################################
# Original posted by caesar & arcade @ Undernet  @ www.forum.botlending.com                         
# Modified by ReaL|DoG on #Lending @ Undernet                            
# For any question or bug please contact ReaLDoG@IrcProject.Info 
# Update reason : Bugs fixed                                                        
###################################################


bind pub -|+v !helper helper:set   
bind pub N|- !admin admin:set  
bind join - * admin:check   
set schan "#BSCegg"  

####### Don't edit below unless you know what you're doing. #####


proc helper:set {nick uhost hand channel txt} {
  global schan
  if {![botonchan $schan]} return
  switch [set mode [string tolower [lindex [split $txt] 0]]] {
    "on" {
      chattr $hand -|+l $schan;
      putserv "NOTICE $nick :Ti-ai setat statusul online."
    }
    "off" {
      chattr $hand -|-l $schan;
      putserv "NOTICE $nick :Ti-ai setat statusul offline."
    }
    default {
      putserv "NOTICE $nick :Sorry, nu cunosc modul \002$mode\002, doar 'on' sau 'off'"
    }
  }
}

proc admin:set {nick uhost hand channel txt} {
global schan
  if {![botonchan $schan]} return
  switch [set mode [string tolower [lindex [split $txt] 0]]] {
    "on" {
      chattr $hand +O ;
      putserv "NOTICE $nick :Ti-ai setat statusul online."
    }
    "off" {
      chattr $hand -O ;
      putserv "NOTICE $nick :Ti-ai setat statusul offline."
    }
    default {
      putserv "NOTICE $nick :Sorry, nu cunosc modul \002$mode\002, doar 'on' sau 'off'"
    }
  }
}

proc admin:check {nick uhost hand chan} {
global schan
  if {![botonchan $schan] || [isbotnick $nick]} return
  if {![llength [set online [chanlist $chan -|+l]]] && [botonchan $schan]} {
    puthelp "NOTICE $nick :Momentan nici un \002HELPER\002 online / Currently no \002HELPER\002 online.";
    } else {
    puthelp "NOTICE $nick :\002HELPERI\002 online / Online \002HELPERS\002: [join $online ","]";
  }
  if {![llength [set online [chanlist $chan +O|-]]] && [botonchan $schan]} {
    puthelp "NOTICE $nick :Momentan nici un \002ADMIN\002 online / Currently no \002ADMINS\002 online.";
    } else {
    puthelp "NOTICE $nick :\002ADMINS\002 online / Online \002ADMINS\002: [join $online ","]";
  }
}
Robby_14 is offline   Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[Abuse] G&G admin abuse MaRiuS Botlending channels 6 10-01-2006 00:26


All times are GMT +3. The time now is 12:04.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.