Code:
proc call_adduser {nick handle chan misc1 misc2 misc3} {
global home groupname botnick numversion strict-host levels
if {$misc1 == ""} {
notice $nick "Usage: (/msg) $botnick adduser (#channel) <nick> <friend | voice | bot | op | master | owner | full | bot | chanvoice | chanowner | chanmaster | chanop>"
notice $nick "See also : (/msg) $botnick levels"
return 0
}
if {$misc2 == ""} {notice $nick "You need to specify a level. Try: (/msg) $botnick levels" ; return 0}
set available [string tolower "bot $levels"]
if {[lsearch -glob $available [string tolower $misc2]] == -1} {notice $nick "$misc2 doesn't exist, you idiot!"; return 0}
set strict 0
if {[string index $misc1 0] == "!"} {set misc1 [string range $misc1 1 end]; set strict 1}
if {![onchan $misc1 $chan]} {notice $nick "$misc1 is not on $chan."; return 0}
set addhost [getchanhost $misc1 $chan]
if {![set strict-host] && ($strict == 0)} {
# Check for "strict-host / ~" issue in eggdrop 1.4.3+
if {[string index $addhost 0] == "~"} {set addhost "*[string range $addhost 1 end]"}
}
set checkhandle [nick2hand $misc1 $chan]
if {$checkhandle == "" || $checkhandle == "*"} {set checkhandle $misc1}
set checkhandle [string range $checkhandle 0 11]; if {$numversion < 1060900} {set checkhandle [string range $checkhandle 0 8]}
if {$strict == 0} {set addhost [maskhost $addhost]
} else {set addhost "*!$addhost"}
..... etc ... ideea e cum fac sa ia bine masca in cazul /mode x ca eu is varza