| View previous topic :: View next topic |
| Author |
Message |
Ashoq Voice

Joined: 17 Jul 2010 Posts: 11
|
Posted: Sun Nov 28, 2010 5:19 pm Post subject: !xadd nickname |
|
|
hi again
i have this TCL it works great
i want just add a msg when user have already access on chan
<mybot> User has already access on chan as level $level
| Code: | bind pub m !xadd xadd
proc xadd {nick uhost hand chan arg} {
set who [lindex $arg 0]
set level "100"
if {![llength $who]} {puthelp "notice $nick :SYNTAX: !xadd nick "; return}
puthelp "privmsg X :adduser $chan =$who $level"
puthelp "privmsg X :modinfo $chan automode =$who op"
puthelp "privmsg $chan :ADDED $who to $chan with access level $level"
} |
10x alot |
|
| Back to top |
|
 |
Madalin Master

Joined: 24 Jun 2005 Posts: 310 Location: Constanta, Romania
|
Posted: Thu Jan 24, 2013 1:50 pm Post subject: |
|
|
You can try this version. I didnt test the script but it has no errors in the code. Yet if you encouter some problems you can reply here and ill modify the code and test it.
| Code: |
bind pub m !xadd x:add
bind notc - * x:notc
proc x:add {nick uhost hand chan arg} {
global temp
set temp(chan) $chan
set temp(user) [lindex [split $arg] 0]
set temp(level) [lindex [split $arg] 1]
if {($temp(user) == "") || ($temp(level) == "")} {putserv "PRIVMSG $chan :4XADD:2 Comanda de folosire este 7» 4!xadd <nick> <nivel> 7«"; return}
putserv "PRIVMSG X :adduser $chan =$temp(user) $temp(level)"
utimer 5 [list x:say $chan $temp(user) $temp(level)]
}
proc x:say {chan user level} {
global temp
if {![info exists temp(stop)]} {
putserv "PRIVMSG $chan :4XADD:2 L-am adaugat pe 7» 04$user 7«2 pe canalul 7» 04$chan 7«2 cu access la X de nivel 7» 04$level 7« "
unset -nocomplain temp(stop)
}
}
proc x:notc {nick uhost hand arg dest} {
global temp
switch -exact -- $nick {
"X" {
if {[string match -nocase "*is already added*" $arg]} {
putserv "PRIVMSG $temp(chan) :\002$temp(user)\002 is already added with X access on \00312$temp(chan)"
set temp(stop) da
}
}
}
}
|
_________________ https://github.com/MadaliNTCL - To chat with me: https://tawk.to/MadaliNTCL |
|
| Back to top |
|
 |
|