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.

script for bot to send commands to irc (chanserv nickserv)

Old posts that have not been replied to for several years.
M
MnM
Voice
Posts: 17
Joined: Sat Jan 01, 2005 1:43 pm

script for bot to send commands to irc (chanserv nickserv)

Post by MnM »

The irc server I use requires me to register the name of the bot (by msg nickserv). The I can give some sort of access to the bot in that chan.
Basically the chan has people in it pretty much all the time so if the bot goes offline it can not be an op if irc server or another user does not op the bot again.

The message needs to be sent from the bot itself to nickserv initially and also it needs to be sent to nickserv everytime the bot logs in the irc server and join the chan. This will give +o to the bot automatically.

How can I achive this?

Thanks.
M
MnM
Voice
Posts: 17
Joined: Sat Jan 01, 2005 1:43 pm

Post by MnM »

I have found the scripts to identify the bot to nickserv so part of my problem is solved. Now I only need the script to register the nick. Even a script that I load once, do the registration and then remove the script.
D
Damnation85
Voice
Posts: 19
Joined: Sun Dec 19, 2004 2:31 pm

Post by Damnation85 »

this may seem stupid but this is what i did....
i did /nick altered my name to the bots name (when it was offline)

registered its nick. then updated the nickserv code that identifies it. then loaded the bot. and all works fine for me : o)
User avatar
user
 
Posts: 1452
Joined: Tue Mar 18, 2003 9:58 pm
Location: Norway

Post by user »

use .msg or .dump? using a script for a simple, one-time task like this seems weird to me.
Have you ever read "The Manual"?
M
MnM
Voice
Posts: 17
Joined: Sat Jan 01, 2005 1:43 pm

Post by MnM »

Damnation85: I can not do that since the eggdrop pc has no irc clients at all. I might look into that option.

user: u mean from party line? can u please explain a bit more? I am sort of new to all this.
M
MnM
Voice
Posts: 17
Joined: Sat Jan 01, 2005 1:43 pm

Post by MnM »

Thanks. using .msg from partyline worked a treat.

Thanks for the help again.
M
MnM
Voice
Posts: 17
Joined: Sat Jan 01, 2005 1:43 pm

Post by MnM »

Did speak a bit too soon.
What I need is a script that will execute a /msg command as soon as the bot joins the irc server. Can anyone help me with this?

Thanks.
User avatar
user
 
Posts: 1452
Joined: Tue Mar 18, 2003 9:58 pm
Location: Norway

Post by user »

MnM wrote:What I need is a script that will execute a /msg command as soon as the bot joins the irc server.

Code: Select all

bind evnt - init-server {putquick "PRIVMSG target :message";#}
Have you ever read "The Manual"?
M
MnM
Voice
Posts: 17
Joined: Sat Jan 01, 2005 1:43 pm

Post by MnM »

Thanks. Try to work with this now, however the msg I am trying to send has $ in so it thinks is a variable. How can I solve this?
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

if it's a global variable, you don't need to change user's code

if it's not global, make it global or substitute [putquick] from user's code with the appropriate proc name, noting that the proc will be called with one argument - event type
M
MnM
Voice
Posts: 17
Joined: Sat Jan 01, 2005 1:43 pm

Post by MnM »

What I am talking about is the :message part from "PRIVMSG target :message";#}

My actual message contains a few $ characters in it (is a password) so the script think is a variable (but is not is just a password). How can I fix this?
User avatar
sofit
Voice
Posts: 2
Joined: Fri Jan 07, 2005 9:14 am
Location: Razgrad, Bulgaria
Contact:

Post by sofit »

Just escape the $ with \$
Kind regards,
Stanislav Zahariev
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

set the password as global variable
M
MnM
Voice
Posts: 17
Joined: Sat Jan 01, 2005 1:43 pm

Post by MnM »

Thanks that is what I was looking for. It worked. All my issues are now solved (for now) :)
M
MnM
Voice
Posts: 17
Joined: Sat Jan 01, 2005 1:43 pm

Post by MnM »

One more:

init-server - this is for when joining the server

how about when joining the chan insted of server?

Thanks guys I really appreciate your help.
Locked