|
JesusPaid4U
|
JesusPaid4U
|
I need a script that will whois everyone that joins a channel I am in and will echo the results.
I am keeping logs through a bot and I want the whois info from everyone that comes into my channels.
Any help is appreciated, thanks
|
|
|
|
LostShadow
|
LostShadow
|
Did you take into consideration that too many people may join your channel at once? What if someone loads proxies into your channel?
What if someone just /hop's all day?
And you just want to fill your status with the whois of the same people over and over again?
And what good is knowing their idle or sign-on time, or seeing the "End of Whois" result over and over.
-Neal.
To whois on join is simply..
on *:join:#:/whois $nick
As simple as it gets, unless you specify detail.
You can replace # with your channel.
|
|
|
|
JesusPaid4U
|
JesusPaid4U
|
Is it possible to have the whois echo into the channel the person joined, it doesn't have to be seen by others but i want it to show up in my room logs for that room, not the status screen.
|
|
|
|
Joined: Aug 2005
Posts: 1,052
Hoopy frood
|
Hoopy frood
Joined: Aug 2005
Posts: 1,052 |
on *:JOIN:#channelhere:{
.whois $nick | %raw_a = # | timer 1 2 /unset %raw_a
}
RAW *:*:{
if (%raw_a) {
if ($numeric == 311) { echo %raw_a W-[host] $+([,$2) is $+($4-,]) }
if ($numeric == 319) { echo %raw_a W-[Chan] $+([,$2) ison $+($4-,]) }
if ($numeric == 312) { echo %raw_a W-[Serv] $+([,$2-,]) }
if ($numeric == 307) { echo %raw_a W-[Iden] $+([,$2-,]) }
if ($numeric == 310) { echo %raw_a W-[Gmsg] $+([,$2-,]) }
if ($numeric == 313) { echo %raw_a W-[IrcI] $+([,$2-,]) }
if ($numeric == 317) { echo %raw_a W-[Idle] $+([,$2-) idletime is $+($3-,]) }
}
}
|
|
|
|
JesusPaid4U
|
JesusPaid4U
|
Thanks but for some reason it shows 2 whois's every time, I do have another script that whois's when people enter to check for bad channels, maybe it would be easier to modify that code to echo the whois in addition to its original purpose instead of adding a new script just to show the whois. Here is that script: menu channel {
-
Badchan Checker
.$iif($group(#badchans) == off,$style(2)) $iif($istok(%protchans,#,44),Remove,Add) protection for #:{
if $istok(%protchans,#,44) {
%protchans = $remtok(%protchans,#,1,44)
echo -ac info * Removed # from the list of protected channels
}
else {
%protchans = $addtok(%protchans,#,44)
echo -ac info * Added # to the list of protected channels
}
}
.-
.$iif($group(#badchans) == on,Disable,Enable):{
if $group(#badchans) == on { .disable #badchans | chans_unload }
else { .enable #badchans | chans_load }
}
}
#badchans on
on @*:JOIN:%protchans:{
hinc -mu2 chancheck $+($cid,#)
if $hget(chancheck,$+($cid,#)) < 5 {
hadd chancheck $nick 1
.enable #chancheck
whois $nick
}
}
on *:START: chans_load
on *:EXIT: chans_unload
#badchans end
#chancheck on
raw 318:*:{
if $hget(chancheck,$2) {
haltdef
hdel chancheck $2
if !$hget(chancheck,0).item { .disable #chancheck }
}
}
raw 319:*: if $hget(chancheck,$2) { haltdef | chans_check $2- }
raw *:*: if $hget(chancheck,$2) && $istok(301 307 310 311 312 313 317 320 330,$numeric,32) { haltdef }
#chancheck end
alias chans_noprefix var %a, %b = $regsub($1-,/(?:^|\s)([^#]+)/g,$chr(32),%a) | return %a
alias chans_check {
var %chans = $chans_noprefix($2-), %a = 1
while $gettok(%chans,%a,32) {
if $hfind(chans,$v1,1,W) { chans_comkick $1 | return }
inc %a
}
}
alias chans_comkick {
var %a = $comchan($1,0), %b
while $comchan($1,%a) {
%b = $v1
if $istok(%protchans,%b,44) && $me isop %b && $1 !isop %b {
ban -ku180 %b $1 2 You cannot join while in a banned or offensive room.
}
dec %a
}
}
alias chans_load {
if !$isfile(chans.txt) {
echo -asc info * Could not find chans.txt. Creating new file...Done.
write chans.txt
}
hmake chans
hload chans chans.txt
echo -ac info Bad channel kicker loaded.
}
alias chans_unload {
chans_save
if $hget(chancheck) { hfree chancheck }
hfree chans
echo -ac info Bad channel kicker unloaded.
}
alias chans_save hsave -o chans chans.txt
alias chans_add {
hadd chans $$1 1
chans_save
echo -ac info * Added $1 to list of bad channels
}
alias chans_rem {
hdel chans $$1
chans_save
echo -ac info * Deleted $1 from list of bad channels
}
alias chans_list {
var %a = 1
echo -asc info ### Listing bad channels ###
while $hget(chans,%a).item {
echo -as * $v1
inc %a
}
}
|
|
|
|
Joined: Nov 2006
Posts: 1,552
Hoopy frood
|
Hoopy frood
Joined: Nov 2006
Posts: 1,552 |
Thanks but for some reason it shows 2 whois's every time, I do have another script that whois's when people enter to check for bad channels, maybe it would be easier to modify that code to echo the whois in addition to its original purpose instead of adding a new script just to show the whois. Indeed, you could use this one as long as this protection is activated for the channel you want to "log". And this script has already some flood protection: hinc -mu2 chancheck $+($cid,#)
$hget(chancheck,$+($cid,#)) < 5 { - If you want to "see" the whois reply lines, remove all the "haltdef" commands in this script (they "halt" the "def"-ault display) - If you want to write these lines to a file, add at every "haltdef" your new write command instead: $2 will be the whois'd users nick in the reply line $3- will be the rest of the reply line.
|
|
|
|
JesusPaid4U
|
JesusPaid4U
|
That sounds good but I do not understand completely, I am afraid I will not be able to modify the script myself. If anyone could make the modifications for me and repost the code I would really appreciate it.
I want to keep it scanning for bad channels and kicking if found just like it always did, but I also want to see the whois echoed in the channel, so it will show up in my room logs.
Thanks
|
|
|
|
|