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.

Need bot to change channel modes

Old posts that have not been replied to for several years.
Locked
R
Random

Post by Random »

I'm building a bot for a friend and I've come across a problem I can't figure out how to solve.

He wants the bot to be able to re-join the channel if it peers, but the channel is set to +i. Is it possible to have the bot (with the founder password) set the channel to MLOCK -i, join, and then remove the MLOCK?

When I try to create a script for it:
set init-server { putserv "PRIVMSG chanserv :identify #channel <pass>"
putserv "PRIVMSG chanserv :SET #channel MLOCK -i"
putserv "PRIVMSG chanserv :SET #channel MLOCK OFF"
putserv "JOIN #channel" }

Then the error comes up that there's either a missing " or there's text after a ". I know that this is a security hole, but the friend wants the bot to do this, and the server's very low profile, but I can't get this to work. Am I doing something wrong? :sad:

<font size=-1>[ This Message was edited by: Random on 2002-03-13 02:17 ]</font>
P
Petersen
Owner
Posts: 685
Joined: Thu Sep 27, 2001 8:00 pm
Location: Blackpool, UK

Post by Petersen »

you don't want to use init-server for this. you want to be using need-invite (or bind need).
R
Random

Post by Random »

Hm. I tried that, but it's too many characters for need-invite.

I've read something about binding procs if you need to, and I guess that's what I need to do. Can you point me to a webpage that will show me how to do this? I can't find anything myself. >_<
R
Random

Post by Random »

Gah. After looking around, I came up with this:

bind need - "% invite" need_invite
proc need_invite {#channel invite} {
putserv "PRIVMSG chanserv :chanserv Identify #channel <pass>"
putserv "PRIVMSG chanserv :chanserv set #channel MLOCK -i"
putserv "PRIVMSG chanserv :chanserv set #channel MLOCK OFF"
putserv "JOIN #channel"
return 0
}

Which I _think_ should work, but my eggdrop (every time I run it) says that 'need' is an invalid 'type'. Does this mean that my script is bad, or that eggdrop is incorectly compiled? Any help or suggestions would be appreciated.

<font size=-1>[ This Message was edited by: Random on 2002-03-13 20:34 ]</font>
P
Petersen
Owner
Posts: 685
Joined: Thu Sep 27, 2001 8:00 pm
Location: Blackpool, UK

Post by Petersen »

means you're running an old bot. upgrade to 1.6.x or use channel set #chan need-invite yourproc for each chan.
m
masskilla
Op
Posts: 172
Joined: Wed Oct 03, 2001 8:00 pm
Location: Croatia

Post by masskilla »

Hi

Also are you _sure_ that you have to do prefix each message to chanserv with chanserv? What you have in your script

Code: Select all

putserv "PRIVMSG chanserv :chanserv set #channel MLOCK OFF"
will give an output like this: msg to chanserv: chanserv set #channel MLOCK OFF? Also I suggest using 'puthelp' instead of 'putserv' for messaging the chanserv since it's has a better/faster que.


MaSsKilla

#eggdrop
Undernet
R
Random

Post by Random »

Right, I removed that part (that gave invalid outputs) and did as you suggested -- I'll try Puthelp now.

As to the rest, i'm getting this error on eggdrop 1.6.9, so either I can't use 'need' as a valid bind, or I'm doing it wrong. How do I go about using what you suggested -- the 'set #chan need-invite'?
Locked