egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Script Help

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help
View previous topic :: View next topic  
Author Message
Jack1
Voice


Joined: 16 Feb 2015
Posts: 3

PostPosted: Sat Feb 21, 2015 3:57 pm    Post subject: Script Help Reply with quote

Hi

I need to get the user mask of a given user in *!*@IP form.

The user is connected to the IRC network, but doesn't necessarily share a channel with a bot on the botnet.

Is it possible?

Cheers,
Jack
Back to top
View user's profile Send private message
willyw
Revered One


Joined: 15 Jan 2009
Posts: 1175

PostPosted: Sun Feb 22, 2015 11:07 am    Post subject: Reply with quote

You have not yet responded to the reply you got on your other request.

How did that work out?
Did you succeed?
(best to respond there in that thread)

After that is finished, then perhaps we can do something with this request.
Back to top
View user's profile Send private message
Jack1
Voice


Joined: 16 Feb 2015
Posts: 3

PostPosted: Sun Feb 22, 2015 2:14 pm    Post subject: Reply with quote

Hi

What about it?

I read the links and wrote the script.

I am expected to paste the script that I wrote (I didn't realise ...)?

Cheers,
Jack
Back to top
View user's profile Send private message
willyw
Revered One


Joined: 15 Jan 2009
Posts: 1175

PostPosted: Sun Feb 22, 2015 3:20 pm    Post subject: Reply with quote

No, that is not expected. Smile

But without some response, I would not know that you could even write ANY script at all.

Apparently, you can.
That is good.
That affects how I will answer, this time.

Let me re-read your original post here, and I'll be back with some ideas for you.
Back to top
View user's profile Send private message
willyw
Revered One


Joined: 15 Jan 2009
Posts: 1175

PostPosted: Sun Feb 22, 2015 3:36 pm    Post subject: Re: Script Help Reply with quote

Start by doing:
.dump whois some_nick
from the partyline. That will make the bot send a whois to the irc server for that nick.

If you cannot see the response in the partyline, do:
.console +r
to enable viewing raw incoming to the bot.
Do:
.console
to view the list of current flags. If r (raw) is still not listed, then it is not enabled in eggdrop.conf. Edit eggdrop.conf to enable it, rehash, and do:
.console +r again.

Do:
.dump whois some_nick
again, and see the return via the partyline.
Find a line that looks like this:
<chanbotviii> [14:26:38] [@] irc.us.ca.mibbit.net 311 ChanbotVIII Rog Rog mib-7B80EB3B.clients.your-server.de * :

See that "311" in that line?
That's a raw numeric. You can bind to that in your script.

Go here:
http://www.eggheads.org/support/egghtml/1.6.21/tcl-commands.html
and text search for:
bind raw
and read about how to use that bind.
With it, you can capture that returned line in a variable.
Now you've got the nick, ident, and hostmask

You can pick it apart with:
split
and with:
lindex

( http://www.tcl.tk/man/tcl8.5/TclCmd/contents.htm )

See: http://www.eggheads.org/support/egghtml/1.6.21/tcl-commands.html
again, and text search for:
maskhost
and read about how to use that command, to get a variety of different returns. I think you are looking for type number 2.

With these things, I think you can cobble together something, such that if you do something like:
!command some_nick
the bot will send a whois on some_nick, (no matter if some_nick is in a channel with the bot or not) and if some_nick is on the server, bot will get the hostmask in the format that you desire.

I hope this helps.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber