This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.
For more information, see this announcement post . Click the X in the top right-corner of this box to dismiss this message.
Requests for complete scripts or modifications/fixes for scripts you didn't write. Response not guaranteed, and no thread bumping!
albozz
Voice
Posts: 8 Joined: Tue Jul 12, 2016 1:40 pm
Location: Albania
Contact:
Post
by albozz » Sun Aug 30, 2020 1:31 pm
hello anyone help me, i want this exp:
Nick:User-nick - IP: 172.58.206.164 - Country: United States - City:Philadelphia - ISP: T-Mobile USA
simo
Revered One
Posts: 1108 Joined: Sun Mar 22, 2015 2:41 pm
Post
by simo » Sun Aug 30, 2020 2:11 pm
first you need to determine where you can get that information from and then have eggdrop retreive it and send it
albozz
Voice
Posts: 8 Joined: Tue Jul 12, 2016 1:40 pm
Location: Albania
Contact:
Post
by albozz » Sun Aug 30, 2020 4:03 pm
send raw connect on user's on unrealircd on exp #opers chan who connect , nick Ip country state
example
*** Client connecting: astrit (Flash@178.132.216.199) [178.132.216.199] {0} [secure]
heartbroken
Op
Posts: 110 Joined: Thu Jun 23, 2011 11:15 pm
Location: somewhere out there
Post
by heartbroken » Sun Aug 30, 2020 4:50 pm
Code: Select all
package require http
package require json
set ExpChan "#opers"
bind raw - NOTICE Client_Connect
proc Client_Connect {from key arg} {
if {[string match *!*@* $from] || ![string match -nocase "*client connecting*" $arg]} { return }
if {[scan $arg %\[^\:\]\:%\[^(\](%\[^@\]@%\[^\)\] _ nick ident host] == "4"} {
set token [http::geturl http://ip-api.com/json/$host?fields=status,city,isp,country,query,regionName,countryCode]
set data [json::json2dict [http::data $token]]
::http::cleanup $token
if {[dict get $data status] eq "success"} {
puthelp "PRIVMSG $::ExpChan :\002Nick\002: $nick - \002IP\002: [dict get $data query] - \002Country\002: [dict get $data country] -\
\002City\002: [dict get $data city] - \002ISP\002: [dict get $data isp] [dict get $data countryCode]"
} else {
putcmdlog "Error! it fails to get data for this $host"
}
}
return 0
}
Life iS Just a dReaM oN tHE wAy to DeaTh
albozz
Voice
Posts: 8 Joined: Tue Jul 12, 2016 1:40 pm
Location: Albania
Contact:
Post
by albozz » Mon Aug 31, 2020 2:21 am
Thx for help but how to remove this:
[08:17] <Rocky> Nick: *** Client connecting: tunix10 - IP: 85.25.10.40 - Country: France - City: Strasbourg - ISP: Host Europe GmbH
heartbroken
Op
Posts: 110 Joined: Thu Jun 23, 2011 11:15 pm
Location: somewhere out there
Post
by heartbroken » Mon Aug 31, 2020 4:32 am
You could change :
to
Code: Select all
\002Nick\002: [regsub -all {([^:]+:)} $nick ""]
Life iS Just a dReaM oN tHE wAy to DeaTh
CrazyCat
Revered One
Posts: 1301 Joined: Sun Jan 13, 2002 8:00 pm
Location: France
Contact:
Post
by CrazyCat » Mon Aug 31, 2020 11:59 am
I've exactly the same thing than heartbroken:
Code: Select all
% set arg {*** Client connecting: astrit (Flash@178.132.216.199) [178.132.216.199] {0} [secure]}
*** Client connecting: astrit (Flash@178.132.216.199) [178.132.216.199] {0} [secure]
% scan $arg %\[^\:\]\:%\[^(\](%\[^@\]@%\[^\)\] _ nick ident host
4
% puts "nick: $nick - ident: $ident - host: $host"
nick: astrit - ident: Flash - host: 178.132.216.199
% info patchlevel
8.6.9
@albozz: which version of tcl are you using ?
ComputerTech
Master
Posts: 399 Joined: Sat Feb 22, 2020 10:29 am
Contact:
Post
by ComputerTech » Thu Sep 17, 2020 6:33 pm
This script stopped working all of a sudden, json/http is loaded, and so is the script, and it just stopped working all of a sudden, anyone got a idea why?
ComputerTech
CrazyCat
Revered One
Posts: 1301 Joined: Sun Jan 13, 2002 8:00 pm
Location: France
Contact:
Post
by CrazyCat » Thu Sep 17, 2020 7:14 pm
Add putlog after sensible lines to see where it stops.
And first thing to check: is your eggdrop alway logged as ircop with the good snomask, does it see the connect notices ?
ComputerTech
Master
Posts: 399 Joined: Sat Feb 22, 2020 10:29 am
Contact:
Post
by ComputerTech » Thu Sep 17, 2020 7:57 pm
via partyline yeah, when a user connects, i see the ip, and general
and yes bot is currently ircop, and has the correct snomasks
Thing is, it worked perfect a few days ago, and i have Not touched the script.
Does it work for you CrazyCat?
ComputerTech
caesar
Mint Rubber
Posts: 3778 Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory
Post
by caesar » Fri Sep 18, 2020 12:55 am
Their API isn't working properly for some reason as i get this JSON answer:
So, you got two options:
1. contact them and ask why the free plan isn't working any more and give them the error above
2. get a PRO plan OR switch to another site
Out of curiosity, how many requests did you do on their website per minute? Give me an appreciation, don't need the exact number. I'm asking cos their TOS says you can do 45 per minute else will get yourself banned for an hour or something.
Once the game is over, the king and the pawn go back in the same box.
ComputerTech
Master
Posts: 399 Joined: Sat Feb 22, 2020 10:29 am
Contact:
Post
by ComputerTech » Fri Sep 18, 2020 8:47 am
Oh, well my network is 300+ users, but i dont believe their would have been 45 connections in 60sec, i mean it's possible, like a netsplit or something,
but i highly doubt it.
I'll go for option one caesar, and contact them, hopefully they can fix it, i will also post here when/if i get it fixed, or if/they contact me back with info.
Cheers lads
ComputerTech
ComputerTech
Master
Posts: 399 Joined: Sat Feb 22, 2020 10:29 am
Contact:
Post
by ComputerTech » Fri Sep 18, 2020 11:55 am
Ok, so they responded with this via email.
Hello,
As the error message states, you're trying to access the API via https, which has never been supported. Please switch to http.
Kind regards,
vlad
--
ip-api.com
what do we edit on the code then?
does the bot have to access the server via non ssl or something?
ComputerTech
CrazyCat
Revered One
Posts: 1301 Joined: Sun Jan 13, 2002 8:00 pm
Location: France
Contact:
Post
by CrazyCat » Fri Sep 18, 2020 1:22 pm
If you use the code given by heartbroken, it doesn't use https, so it must work.
And no matter if your eggdrop connects through ssl or not to your server, the http request is independant and will do what you ask it to do (so, connect to
http://ip-api.com ).
If you didn't change the code and it stopped working, the trouble could be somewhere else. So...
putlog !
ComputerTech
Master
Posts: 399 Joined: Sat Feb 22, 2020 10:29 am
Contact:
Post
by ComputerTech » Fri Sep 18, 2020 2:50 pm
Ok, but didnt caesar use heartbroken's clde as well? and got a error
but i will do that and find out whats wrong, then post here
Cheers CrazyCat
ComputerTech