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.

simple question: how to send output of a command to console?

Old posts that have not been replied to for several years.
Locked
r
realistic

simple question: how to send output of a command to console?

Post by realistic »

Goodevening,

this might me a simple question with a simple answer but I have the following problem. I run an eggdrop on a server that masquerades all hostmasks to nick!ident@webirc. As an operator I can see the real IP address by sending the command 'USERIP nick' to the server.

How do I create a TCL that can be called from the console by .userip and that will send the answer from the IRC server back to the console, like this:

.userip REalistic
REalistic=+realistic@62.194.0.0

Is there anyone who can assist me with this? Thanks in advance.

REalistic
r
realistic

Post by realistic »

nobody? :cry:
I
Ian-Highlander
Op
Posts: 165
Joined: Mon Sep 24, 2001 8:00 pm
Location: Ely, Cambridgeshire

Post by Ian-Highlander »

Before you could get any further with this, the bot would also need to be a sysop as it would be the bot that needed to use the command to achieve what you are asking.

This is a very high security risk and I wouldnt recommend it to anyone (although I run a couple of highly modified sysop eggdrops on my own small server but this has taken a long time to get anything like secure on the shell and is still technically a risk).
"Insanity Takes Its Toll, Please Have Exact Change"
r
realistic

Post by realistic »

Well it's not really a security risk because the bot's IP address isn't visible either :-] Furthermore the bot doesn't listen to messages send by users and does not accept dcc chats. The only way to connect to the bot is by use of a telnet client on a non-standard port.
I
Ian-Highlander
Op
Posts: 165
Joined: Mon Sep 24, 2001 8:00 pm
Location: Ely, Cambridgeshire

Post by Ian-Highlander »

Heh, if thats your impression of all the security risks that exist with using Eggdrop for more secure things like Sysop then you need to be very careful.

Anyway, that aside, simply set your bot up with an oper username and password and the appropriate flags you want to give it in the ircd config file rehash the server and then write yourself a small script so that the bot opers up and then you can script it to send and receive the same commands and data that you do.

For a starting point, I posted a script I started working on ages ago and never got round to finishing which will point you in the right sort of direction for somethings in a previous thread. I never finished it, or made it secure as I abandoned it and went a completely different way with the bots I use.

Its here if you want it: http://www.highlandfox.com/downloads/system_bot.tcl

Hope this helps

Regards

Ian-Highlander
"Insanity Takes Its Toll, Please Have Exact Change"
Locked