Little GeoIP info for connecting users
 

News:

29 December 2022 - PtokaX 0.5.3.0 (20th anniversary edition) released...
11 April 2017 - PtokaX 0.5.2.2 released...
8 April 2015 Anti child and anti pedo pr0n scripts are not allowed anymore on this board!
28 September 2015 - PtokaX 0.5.2.1 for Windows 10 IoT released...
3 September 2015 - PtokaX 0.5.2.1 released...
16 August 2015 - PtokaX 0.5.2.0 released...
1 August 2015 - Crowdfunding for ADC protocol support in PtokaX ended. Clearly nobody want ADC support...
30 June 2015 - PtokaX 0.5.1.0 released...
30 April 2015 Crowdfunding for ADC protocol support in PtokaX
26 April 2015 New support hub!
20 February 2015 - PtokaX 0.5.0.3 released...
13 April 2014 - PtokaX 0.5.0.2 released...
23 March 2014 - PtokaX testing version 0.5.0.1 build 454 is available.
04 March 2014 - PtokaX.org sites were temporary down because of DDOS attacks and issues with hosting service provider.

Main Menu

Little GeoIP info for connecting users

Started by ??']['??l?, 21 July, 2006, 11:54:24

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

??']['??l?

<...:::RuthlessRicK?:::...> You are connecting from Finland ?There are 1 others of your kind ?Your Current IP is - xxx.xxx.xx.xxx

This is from the geoIP-07.a script and i only need this kinda message when users connect to my hub, so they can see if there`s others from the same country....

So can someone make a simple script like that, bcuz i don`t need other parts from tha geoIP script, only that^^^^^^ :) :) :) :) :)

Thanks...

Alexinno

edit GeoIP-0.7a.lua and search this function

function GeoIP:SendConnectData( user, scountry )
	if scountry and ( self._SendInfoOnConnect == 1 ) then
		-- Send Info
		user:SendData( self._bot, "?  Hello "..user.sName.."  ?\r\n"..
		"? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? \r\n"..
		"  Welcome to "..frmHub:GetHubName().." :0)\r\n"..
		"   ? You are connecting from "..scountry..",\r\n"..
		"    ? There are  "..(self._online[scountry][2]-1).."  others of your kind\r\n"..
		"     ? & Your Current IP is - "..user.sIP.." -\r\n"..
		"? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ")
	end


and remove the the lines that ou don't need, here is an example for user name , user country, and others from user country
function GeoIP:SendConnectData( user, scountry )
	if scountry and ( self._SendInfoOnConnect == 1 ) then
		-- Send Info
		user:SendData( self._bot, "?  Hello "..user.sName.."  ?\r\n"..
		"? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? \r\n"..
		"   ? You are connecting from "..scountry..",\r\n"..
		"    ? There are  "..(self._online[scountry][2]-1).."  others of your kind\r\n"..
		"? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ")
	end


i hope this will help ;)

??']['??l?

#2
function GeoIP:SendConnectData( user, scountry )
	if scountry and ( self._SendInfoOnConnect == 1 ) then
		-- Send Info
		user:SendData( self._bot, "You are connecting from "..scountry.." ?There are "..(self._online[scountry][2]-1).." others of your kind ?Your Current IP is - "..user.sIP.."  \r\n".. 
		
		
		
		
		"")
	end


I have already done that^^^^, but  what i meant was that i only need a little send info on connect script....like that, bcuz i don`t need the whole geoip script... :)

Thanks... ;)

Alexinno

you need only this function ? , to show users this info ???


Typhoon

Quote from: ??']['??l??S on 24 July, 2006, 14:39:49
function GeoIP:SendConnectData( user, scountry )
	if scountry and ( self._SendInfoOnConnect == 1 ) then
		-- Send Info
		user:SendData( self._bot, "You are connecting from "..scountry.." ?There are "..(self._online[scountry][2]-1).." others of your kind ?Your Current IP is - "..user.sIP.."  \r\n".. 
		
		
		
		
		"")
	end


I have already done that^^^^, but  what i meant was that i only need a little send info on connect script....like that, bcuz i don`t need the whole geoip script... :)

Thanks... ;)

but that function uses the rest of the GeoIP script to extract the users country.
it's only a very small part you can remove so my best idea is to keep it as it is..
btw .  is there a point in removing stuff from the script then please say so ?

Typhoon?



SMF spam blocked by CleanTalk