![]() |
|
|
#1 (permalink) |
|
Senior Member
|
Vreau si eu un mic tcl care la take pe chan sa dea remuser la cel care face take / sa dea suspend la cel care i-a dat access / sa lase note cu aceste 2 usere
__________________
Forza RAPID ALE ALEEEEEEEEEEEEEEEEEEEEEEe Last edited by GoRaPiD; 26-12-2004 at 02:02. |
|
|
|
|
|
#2 (permalink) |
|
Member
|
Code:
# $Id: xremuser.tcl, eggdrop-1.6.x 2004 dpgc@purehype.net Exp $ bind kick - "*" xkick setudef flag xneed proc xkick {nick uhost hand chan vict reas} { if {[string toupper $nick] != "X" || ![channel get $chan xneed]} { return } if {![string equal -nocase $vict $::botnick]} { return } set kicker [string trim [lindex [split $reas] 0] {()}] putquick "PRIVMSG X :remuser $chan $kicker" } putlog "XRemuser Loaded"
__________________
Owner of #ro-tcl |
|
|
|
|
|
#3 (permalink) |
|
Administrator
aka aqwzsx |
Code:
if {[string toupper $nick] != "X" || ![channel get $chan xneed]} {
return
}
>>> inceput citat Code:
if {$x == "foo"} command
expr is unreliable for string comparison.
Code:
if {"0xa" == "10"} {puts stdout ack! } => ack!
Example 4-1 Comparing strings with string compare. Code:
if {[string compare $s1 $s2] == 0} { # strings are equal }
Example 4-2 Comparing strings with string equal. Code:
if {[string equal $s1 $s2]} { # strings are equal}
referitor la Code:
if {![string equal -nocase $vict $::botnick]} {
return
}
"The Tcl byte-code compiler generates faster code when you declare namespace and global variables. Each procedure context has its own table of variables. The table can be accessed by a direct slot index, or by a hash table lookup of the variable name. The hash table lookup is slower than the direct slot access. When you use the variable or global command, then the compiler can use a direct slot access. If you use qualified names, the compiler uses the more general hash table lookup." & referitor la Code:
bind kick - "*" xkick
...
set kicker [string trim [lindex [split $reas] 0] {()}]
|
|
|
|
|
|
#4 (permalink) | |
|
Member
Join Date: Dec 2004
Location: Under a rock!
Posts: 116
Rep Power: 33 ![]() |
Quote:
Nu-i frumos sa stii. O sa te trag de urechi daca mai faci.. Code:
bind kick - "*" x:kick
proc x:kick {nick uhost hand chan vict reas} {
if {![isbotnick $vict] || $nick != "X"} {
return
}
set kicker [string trim [lindex [split $reas] 0] {()}]
putserv "PRIVMSG X :access $chan $kicker -modif"
}
bind notc f "*MODIFICAT:*" x:access
proc x:access {nick uhost hand text dest} {
if {[isbotnick [lindex [split $dest "@"] 0]]} {
putserv "PRIVMSG GoRaPiD :$text"
}
}
|
|
|
|
|
|
|
#5 (permalink) |
|
Administrator
aka aqwzsx |
Kurupt uf uf
is that true ? Caesar nice coding (am vazut toate 5 posturi) & site nice, binevenit la noi pe forum.Doar o mica remarca care o prevad pentru Gorapid, acest script e facut pentru X cu limba ro setata la X Trebuie de verificat daca nu este raw de acelas tip, ca sa nu depinda scriptul de limba setata.
|
|
|
|
|
|
#7 (permalink) |
|
Administrator
aka aqwzsx |
Poti face asa
Code:
putserv "PRIVMSG GoRaPiD :$text" Code:
report |n take $chan $text Code:
proc report {flag subj chan text} {
set chanlist [userlist $flag $chan]
if {$chanlist < 1} {return}
foreach user $chanlist {sendnote $subj $user $text}
}
Desigur, poti si sa nu faci procesul report aparte, dar am facut asa pentru ca sa poti reutiliza aceasta functie de mai mult ori + e mai clar asa ce face fiecare functia sendnote, scopul nu este de a da scriptul gata, dar de a arata cum s-ar putea de facut. |
|
|
|
|
|
#8 (permalink) |
|
Member
Join Date: Dec 2004
Location: Under a rock!
Posts: 116
Rep Power: 33 ![]() |
aqwzsx : multumesc pentru remarca, fac si eu ce pot.
![]() Orice script sau bucata de script e data ca exemplu si trebuie tratata ca atare, si nu pretind ca le stiu pe toate sau ca am dreptate intotdeauna. ![]() Nu exista nici un raw pentru asta, e un simplu notice de la X. Doar daca te chinui sa numeri liniile sau ceva in genul, oricum nu cred ca isi are cazul sa te scarpini la urechea stanga cu mana dreapta.
|
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Star Wars Episod III : Revenge of the Sith | AdrianK | OFF TOPIC | 5 | 30-05-2005 21:48 |