|
Joined: Dec 2005
Posts: 15
Pikka bird
|
OP
Pikka bird
Joined: Dec 2005
Posts: 15 |
how can i make a script who read and notify me everytime that connects a same IP ??, for example we have an IP 200.221.45.67 with the nick of mirna....then the next week the same ip connects but with the nick of norma...then the script read that and send me a message about this IP, can we do that ??
|
|
|
|
Joined: Aug 2004
Posts: 7,252
Hoopy frood
|
Hoopy frood
Joined: Aug 2004
Posts: 7,252 |
By connect, do you literally mean when they connect to the network, or do you mean when they join your room/channel? If the first, then you will probably need to have IRCop status on the network. Please reply with the network and if you have IRCop status on it or not.
If the second, then it's quite a bit easier. In either case, there's no guarantee that it's going to be the same person, whether they are using a different nick or not. Some IP addresses (especially those used for people using dial-up access) are dynamically set, not statically. The difference is that with a dynamic address, as soon as one person stops using an address, it becomes available for someone else to use. In comparison, a static address is reserved for you and you only.
|
|
|
|
Joined: Dec 2005
Posts: 15
Pikka bird
|
OP
Pikka bird
Joined: Dec 2005
Posts: 15 |
well im not an ircop so the second alternative is the right ask....i mean this script must be work in all channels where i will be...so if just work in one channel thats ok too...
|
|
|
|
Joined: Dec 2005
Posts: 15
Pikka bird
|
OP
Pikka bird
Joined: Dec 2005
Posts: 15 |
maybe i can make a list (ips.txt) and read it every time that a nick joins in my channels and send me a message or...another list (kicks.txt) with nicks and kick it...maybe..i dont know!!
|
|
|
|
Joined: Sep 2003
Posts: 261
Fjord artisan
|
Fjord artisan
Joined: Sep 2003
Posts: 261 |
I dunno your level of script experience but I'm no better off, so I'm gunna give you some small stuff I just came up with.
on 1:join:#: {
var %pathtoaddressdat = $+(", $scriptdirips.txt, ")
;$scriptdirips.txt means $scriptdir (the scripts directory) plus ips.txt
;$address($nick,2) will result in *!*@address
;read the %pathtoaddressdat for a line beginning with the address if found echos the result
if ($read(%pathtoaddressdat,w, $address($nick,2))) {
echo -a $nick $+ 's address matches address in database
}
}
ips.txt *!*@ipaddress *!*@somethingblahblah
|
|
|
|
Joined: Dec 2005
Posts: 15
Pikka bird
|
OP
Pikka bird
Joined: Dec 2005
Posts: 15 |
thanks im gonna try it...:)
|
|
|
|
Joined: Aug 2004
Posts: 7,252
Hoopy frood
|
Hoopy frood
Joined: Aug 2004
Posts: 7,252 |
Here's what I came up with. While Scorpwanna's script looks like it'd work (I didn't test it), this is more complex, and will track on a channel by channel basis, and is also multiple network compatable. on me:*:join:#:{
var %a = 1, %b = $nick($chan,0)
while %a <= %b {
var %address = $address($nick($chan,%a),0)
%address = $right(%address,-2)
.hadd -m Aliases $+($network,.,$chan,.,%address) $addtok($hget(Aliases,$+($network,.,$chan,.,%address)),$nick($chan,%a),44)
if $numtok($hget(Aliases,$+($network,.,$chan,.,%address)),44) > 1 {
var %aka = $remtok($hget(Aliases,$+($network,.,$chan,.,%address)),$nick,1,44)
echo -a $nick in $chan from $network using $address also recognized as $replace(%aka,$chr(44),$+($chr(44),$chr(32)))
}
}
}
on *:join:#:{
.hadd -m Aliases $+($network,.,$chan,.,$address) $addtok($hget(Aliases,$+($network,.,$chan,.,$address)),$nick,44)
if $numtok($hget(Aliases,$+($network,.,$chan,.,$address)),44) > 1 {
var %aka = $remtok($hget(Aliases,$+($network,.,$chan,.,$address)),$nick,1,44)
echo -a $nick in $chan from $network using $address also recognized as $replace(%aka,$chr(44),$+($chr(44),$chr(32)))
}
}
on *:start:{
if !$hget(Aliases) { .hmake Aliases 10 }
if $exists(Aliases.hsh) { .hload Aliases Aliases.hsh }
}
on *:exit:{
.hsave -o Aliases Aliases.hsh
}
on *:disconnect:{
.hsave -o Aliases Aliases.hsh
}
|
|
|
|
Joined: Sep 2003
Posts: 261
Fjord artisan
|
Fjord artisan
Joined: Sep 2003
Posts: 261 |
Whoa, yeah I'd say that's more complex heh. Prolly better for what he needs too.
|
|
|
|
Joined: Apr 2006
Posts: 464
Fjord artisan
|
Fjord artisan
Joined: Apr 2006
Posts: 464 |
I tried using the script, and it does look neat. Just discovered one problem though. When I join a channel, it freezes my mIRC.
I hit CTRL+Break * Break: command halted (line 7, Aliasses_script.mrc)
Which refers to: if $numtok($hget(Aliases,$+($network,.,$chan,.,%address)),44) > 1 {
Any idea what's wrong?
|
|
|
|
Joined: Apr 2006
Posts: 464
Fjord artisan
|
Fjord artisan
Joined: Apr 2006
Posts: 464 |
I think you forgot the inc %a command
on me:*:join:#:{
var %a = 1, %b = $nick($chan,0)
while %a <= %b {
var %address = $address($nick($chan,%a),0)
%address = $right(%address,-2)
.hadd -m Aliases $+($network,.,$chan,.,%address) $addtok($hget(Aliases,$+($network,.,$chan,.,%address)),$nick($chan,%a),44)
if $numtok($hget(Aliases,$+($network,.,$chan,.,%address)),44) > 1 {
var %aka = $remtok($hget(Aliases,$+($network,.,$chan,.,%address)),$nick,1,44)
echo -a $nick in $chan from $network using $address also recognized as $replace(%aka,$chr(44),$+($chr(44),$chr(32)))
}
[color:blue]inc %a[/color]
}
}
|
|
|
|
Joined: Aug 2004
Posts: 7,252
Hoopy frood
|
Hoopy frood
Joined: Aug 2004
Posts: 7,252 |
Ooops..yeah, I did miss that...sorry...nice catch. Thanks.
|
|
|
|
Joined: Apr 2006
Posts: 464
Fjord artisan
|
Fjord artisan
Joined: Apr 2006
Posts: 464 |
I've been using RusselB's script for a while now, and in general it works pretty neat. There is just one thing that bugs me (kind of).
When someone joins like 5 channels, that we are both in, the script relays it all 5 times.
Is there a way to limit this, so that it only echo's this 1 time.
Below is the example of what I mean: =16:36:31= NICK in #channel1 from SERVER using ADDRESS also recognized as ALIAS1, ALIAS2 =16:36:45= NICK in #channel2 from SERVER using ADDRESS also recognized as ALIAS1, ALIAS2 =16:36:47= NICK in #channel3 from SERVER using ADDRESS also recognized as ALIAS1, ALIAS2 =16:36:49= NICK in #channel4 from SERVER using ADDRESS also recognized as ALIAS1, ALIAS2 =16:36:51= NICK in #channel5 from SERVER using ADDRESS also recognized as ALIAS1, ALIAS2
Thx for any help
|
|
|
|
Joined: Aug 2004
Posts: 7,252
Hoopy frood
|
Hoopy frood
Joined: Aug 2004
Posts: 7,252 |
Here you go: on me:*:join:#:{
var %a = 1, %b = $nick($chan,0)
while %a <= %b {
var %address = $address($nick($chan,%a),0)
%address = $right(%address,-2)
.hadd -m Aliases $+($network,.,$chan,.,%address) $addtok($hget(Aliases,$+($network,.,$chan,.,%address)),$nick($chan,%a),44)
if $numtok($hget(Aliases,$+($network,.,$chan,.,%address)),44) > 1 {
var %aka = $remtok($hget(Aliases,$+($network,.,$chan,.,%address)),$nick,1,44)
echo -a $nick in $chan from $network using $address also recognized as $replace(%aka,$chr(44),$+($chr(44),$chr(32)))
}
inc %a
}
}
on *:join:#:{
.hadd -m Aliases $+($network,.,$chan,.,$address) $addtok($hget(Aliases,$+($network,.,$chan,.,$address)),$nick,44)
if $numtok($hget(Aliases,$+($network,.,$chan,.,$address)),44) > 1 {
var %aka = $remtok($hget(Aliases,$+($network,.,$chan,.,$address)),$nick,1,44)
if $comchan($nick,0) == 1 {
echo -a $nick in $chan from $network using $address also recognized as $replace(%aka,$chr(44),$+($chr(44),$chr(32)))
}
}
}
on *:start:{
if !$hget(Aliases) { .hmake Aliases 10 }
if $exists(Aliases.hsh) { .hload Aliases Aliases.hsh }
}
on *:exit:{
.hsave -o Aliases Aliases.hsh
}
on *:disconnect:{
.hsave -o Aliases Aliases.hsh
}
|
|
|
|
Joined: Apr 2006
Posts: 464
Fjord artisan
|
Fjord artisan
Joined: Apr 2006
Posts: 464 |
|
|
|
|
|