Channel info $chan
.$+(Users,$chr(58),$chr(9),$nick($chan,0)) : return
.$+(Modes,$chr(58),$chr(9),$chan($chan).mode) : return
.-
.$+(Topic,$chr(9),➔): echo -a Topic $+($chan,:) $chan($chan).topic
.$+(User List,$chr(9),➔):{
.ialfill -f $chan | var %win_name $+(@User,$chr(160),List,$chr(160),$chan)
if ($window(%win_name)) .window -c %win_name | .window -Bk %win_name $mircexe 13
.aline -p %win_name Channel $+(12,$chan,) user list. Total $+(12,$nick($chan,0),) users: | .aline -p %win_name $chr(160)
var %i 1 | while (%i <= $nick($chan,0)) {
var %user_mask $address($nick($chan,%i),5), %user_nick $gettok(%user_mask,1,33), %user_idhost $gettok(%user_mask,2,33)
.aline -p %win_name %i $+(06,%user_nick,) - $+(10,$replace(%user_idhost,@,@),)
inc %i
}
}
.$+(User Zones,$chr(9),➔):{
.ialfill -f $chan | var %win_name $+(@User,$chr(160),Zones,$chr(160),$chan)
if ($window(%win_name)) .window -c %win_name | .window -Bk %win_name $mircexe 52
.aline -p %win_name Channel $+(12,$chan,) zones: | .aline -p %win_name $chr(160)
.hfree -w user_zones | .hfree -w user_zone_hosts | var %i 1 | while (%i <= $nick($chan,0)) {
var %user_mask $address($nick($chan,%i),5), %user_zone $upper($gettok(%user_mask,$numtok(%user_mask,46),46))
if (%user_zone isalpha && $len(%user_zone) <= 4) {
.hinc -m user_zones %user_zone 1 | .write -i $+(user_zones_,%user_zone) %user_mask
}
inc %i
}
var %i 1 | while (%i <= $hget(user_zones,0).item) {
var %user_zone $hget(user_zones,%i).item, %user_zone_num $hget(user_zones,%user_zone)
.aline -p %win_name Zones:06 %user_zone ~04 %user_zone_num
inc %i
}
.aline -p %win_name $str(15-,50)
var %i 1 | while (%i <= $hget(user_zones,0).item) {
var %user_zone $hget(user_zones,%i).item
.aline -p %win_name The $+(07,%user_zone,) addresses are:
var %file_zone_hosts $+(user_zones_,%user_zone) | var %q 1 | while (%q <= $lines(%file_zone_hosts)) {
var %user_zone_str $read(%file_zone_hosts,%q)
var %user_zone_nick $gettok(%user_zone_str,1,33), %user_zone_host $gettok(%user_zone_str,2,64)
.aline -p %win_name $+($chr(8195),06,%user_zone_nick,) - $+(10,%user_zone_host,)
inc %q
}
.remove %file_zone_hosts | .aline -p %win_name $chr(160)
inc %i
}
}
.-
.$+(Find Addresses by Word,$chr(9),➔):{
var %text $+(Enter a word to search in addresses.,$chr(13),Example: domen.us,$chr(44) domen,$chr(44) .us), %word $?=" %text "
if (%word) {
.ialfill -f $chan | var %win_name $+(@Find,$chr(160),Addr,$chr(160),$chan)
if ($window(%win_name)) .window -c %win_name | .window -Bk %win_name $mircexe 59
.aline -p %win_name Search on the channel $+(12,$chan,) all address by part of the word. | .aline -p %win_name $chr(160)
var %user_addr_num1 $ialchan($+(*,%word,*@*),$chan,0).addr, %user_addr_num2 $ialchan($+(*@*,%word,*),$chan,0).addr
var %user_addr_sum $calc(%user_addr_num1 + %user_addr_num2)
.aline -p %win_name There are $+(04,%user_addr_sum,) addresses that contain the word $+(",07,%word,,")
.aline -p %win_name $chr(160)
if (%user_addr_sum) {
var %i 1, %n 1 | while (%i <= %user_addr_num1) {
var %user_nick $ialchan($+(*,%word,*@*),$chan,%i).nick, %user_idhost $ialchan($+(*,%word,*@*),$chan,%i).addr
.aline -p %win_name %n $+(06,%user_nick,) - $+(10,$replace(%user_idhost,@,@,%word,$+(07,%word,10)),)
inc %i | inc %n
}
var %i 1 | while (%i <= %user_addr_num2) {
var %user_nick $ialchan($+(*@*,%word,*),$chan,%i).nick, %user_idhost $ialchan($+(*@*,%word,*),$chan,%i).addr
.aline -p %win_name %n $+(06,%user_nick,) - $+(10,$replace(%user_idhost,@,@,%word,$+(07,%word,10)),)
inc %i | inc %n
}
.aline -p %win_name $chr(160)
}
}
}