|
Joined: Mar 2008
Posts: 31
Ameglian cow
|
OP
Ameglian cow
Joined: Mar 2008
Posts: 31 |
i want it that as user join my server and IP match from ip.txt database script auto kick and Ban the chatter in C class like if chatter Matt joined script will take who and on matching iP from Ip.txt will kick matt and will ban his ip like *!*@122.25.25.* Script is as under.
on *:join:*: { .who $nick } raw 352:*: { if ($read(ip.txt, w, $4)) { .k $4 4Come with Original IP Dear } }
|
|
|
|
Joined: Jun 2007
Posts: 933
Hoopy frood
|
Hoopy frood
Joined: Jun 2007
Posts: 933 |
Something like this? on @!*:JOIN:*: who $nick
raw 352:*:{
if ($read(ip.txt,$4)) {
var %n = $comchan($3,0), %nick = $6, %ip = $v1
while (%n) {
var %chan = $comchan(%nick,%n)
if ($comchan(%nick,%n).op) { mode %chan +b *!*@ $+ $gettok(%ip,1-3,46) $+ .* | kick %chan %nick 4Come with Original IP Dear }
dec %n
}
}
}
|
|
|
|
Joined: Feb 2009
Posts: 133
Vogon poet
|
Vogon poet
Joined: Feb 2009
Posts: 133 |
@5618: $read(ip.txt,w,$4)
WorldDMT
|
|
|
|
Joined: Jun 2007
Posts: 933
Hoopy frood
|
Hoopy frood
Joined: Jun 2007
Posts: 933 |
Since $4 is the host returned by the server, which contains no wildcards, I see no use for the w-switch.
|
|
|
|
Joined: Mar 2008
Posts: 31
Ameglian cow
|
OP
Ameglian cow
Joined: Mar 2008
Posts: 31 |
its not working fully.
its taking who on join but not kicking even ip is same as in ip.txt
|
|
|
|
Joined: Jun 2007
Posts: 933
Hoopy frood
|
Hoopy frood
Joined: Jun 2007
Posts: 933 |
Try adding some dubugging code to verify all values are as expected: on @!*:JOIN:*: who $nick
raw 352:*:{
echo -s 1: $1 2: $2 3: $3 4: $4 5: $5 6: $6
echo -s READ: $read(ip.txt,$4)
if ($read(ip.txt,$4)) {
var %n = $comchan($3,0), %nick = $6, %ip = $v1
while (%n) {
var %chan = $comchan(%nick,%n)
if ($comchan(%nick,%n).op) { echo -s .OP TRUE | mode %chan +b *!*@ $+ $gettok(%ip,1-3,46) $+ .* | kick %chan %nick 4Come with Original IP Dear }
dec %n
}
}
}
|
|
|
|
Joined: Mar 2008
Posts: 31
Ameglian cow
|
OP
Ameglian cow
Joined: Mar 2008
Posts: 31 |
1: habibi 2: #SS 3: java 4: 122.164.92.79 5: DesiChat.chat.server 6: nasheela READ: 122.164.92.79 -
But No Kick to User Even no Message like before
|
|
|
|
Joined: Jun 2007
Posts: 933
Hoopy frood
|
Hoopy frood
Joined: Jun 2007
Posts: 933 |
Are you a channel op (+o/@ or higher) on the channel in question?
|
|
|
|
Joined: Jun 2007
Posts: 933
Hoopy frood
|
Hoopy frood
Joined: Jun 2007
Posts: 933 |
Ah, 2 problems: 1. ip.txt is a reserved name in your $mircdir and cannot be used: rename your file to ips.txt 2. I should indeed have used the w-switch, so I stand corrected. on @!*:JOIN:*: who $nick
raw 352:*:{
if ($read(ips.txt,w,$4)) {
var %n = $comchan($6,0), %nick = $6, %ip = $4
while (%n) {
var %chan = $comchan(%nick,%n)
if ($comchan(%nick,%n).op) { mode %chan +b *!*@ $+ $gettok(%ip,1-3,46) $+ .* | kick %chan %nick 4Come with Original IP Dear }
dec %n
}
}
}
Edit: my $3 was an old remaining typo ;D
Last edited by 5618; 18/06/10 03:50 PM.
|
|
|
|
Joined: Nov 2006
Posts: 1,559
Hoopy frood
|
Hoopy frood
Joined: Nov 2006
Posts: 1,559 |
raw 352:*:{
if ($read(ips.txt,w,$4)) {
var %n = $comchan($6,0)
while (%n) {
if ($comchan($6,%n).op) {
mode $comchan($6,%n) +b *!*@ $+ $gettok($4,1-3,46) $+ .*
kick $comchan($6,%n) $6 Come back with Original IP, dear
}
dec %n
}
}
} Note the $6 used with the first $comchan (as it's the nickname) Also note that "ip.txt" is a forbidden file name, the code above uses ip s.txt. Edit: you partially beat me to it  Edit2: Forgot to put the w-switch
|
|
|
|
Joined: Mar 2008
Posts: 31
Ameglian cow
|
OP
Ameglian cow
Joined: Mar 2008
Posts: 31 |
its taking who of nick but after then not working . no action
|
|
|
|
Joined: Sep 2009
Posts: 52
Babel fish
|
Babel fish
Joined: Sep 2009
Posts: 52 |
Wrong raw event, methinks...
In my QueryGuard, I use 354, 314, 315 and 369, where two of them get the address, and two of them get the end of whois/whowas, so if a whois fails to get the address for some reason, it uses a whowas instead.
I believe what you need is raw 354 :>
ziv.
|
|
|
|
Joined: Jun 2007
Posts: 933
Hoopy frood
|
Hoopy frood
Joined: Jun 2007
Posts: 933 |
Whose code are you currently using? And did you remove all previous copies of the script?
|
|
|
|
Joined: Nov 2006
Posts: 1,559
Hoopy frood
|
Hoopy frood
Joined: Nov 2006
Posts: 1,559 |
raw 352 is standard who reply...
|
|
|
|
Joined: Sep 2009
Posts: 52
Babel fish
|
Babel fish
Joined: Sep 2009
Posts: 52 |
Perhaps, I used whois and whowas...
ziv.
|
|
|
|
Joined: Mar 2007
Posts: 41
Ameglian cow
|
Ameglian cow
Joined: Mar 2007
Posts: 41 |
who ever joins in my server not listed in nicks.txt will get zline, anyone can do that ?
|
|
|
|
|