Skip to first unread message

SuperRemalia

unread,
Nov 25, 2014, 12:04:11 PM11/25/14
to ajax...@googlegroups.com
Hi,

I wonder if someone has an idea how to have the IP of a guest, recorded at "log file", without being inside the chat, as administrator or moderator.

example inside log file : (25-11-2014 - 01:06:55) Chat Bot: Maria is inside the chatroom (ip: xxx.xxx.xxx.xxx).

Or (a better idea), how to show the ip of a guest automatically in the main window, but only to be viewed from the administrator and the operators.

Thank you

SuperRemalia

unread,
Nov 28, 2014, 11:10:54 AM11/28/14
to ajax...@googlegroups.com
I made a change inside the chat.js :

replaceCommandLogin: function(textParts) {
       
if(this.userRole === '2' || this.userRole === '3')
           
return    '<span class="chatBotMessage">'
               
+ this.lang['login'].replace(/%s/, textParts[1]) + ' '
               
+ this.replaceCommandWhois(textParts)
               
+ '</span>';
       
else
           
return    '<span class="chatBotMessage">'
               
+ this.lang['login'].replace(/%s/, textParts[1])
               
+ '</span>';
   
},

the result of this change is : "Guest entered the chat. Guest's IP address: undefined."  , which is only visible from moderators and the admin. The same result is if I change it to this :

replaceCommandLogin: function(textParts) {
       
if(this.userRole === '2' || this.userRole === '3')
           
return    '<span class="chatBotMessage">'
               
+ this.lang['login'].replace(/%s/, textParts[1]) + ' '
               
+ this.lang['whois'].replace(/%s/, textParts[1]) + ' '
               
+ '<a title="Geolocation" target="_blank" href="http://www.ip-tracker.org/locator/ip-lookup.php?ip=' + textParts[2] + '">'
               
+ textParts[2]
               
+ '</span>';
       
else
           
return    '<span class="chatBotMessage">'
               
+ this.lang['login'].replace(/%s/, textParts[1])
               
+ '</span>';
   
},

My question is why the textParts[2] is working with the "whois case" and not with "login case". How can we make the bot call the "whois case" by the entrance of someone inside the chat room and to be visible only by the mods and the admin. Basically, I'd prefer to have a record of guest's IP address inside the log file, no matter if a mod or an admin has login inside the chat room.

Any ideas ?




Reply all
Reply to author
Forward
0 new messages