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.

set init-server - problem

Old posts that have not been replied to for several years.
Locked
s
sys
Voice
Posts: 19
Joined: Mon Sep 24, 2001 8:00 pm
Location: Middle East

set init-server - problem

Post by sys »

Eggdrop version 1.6.10
I run the bot on DALnet. I wonder why the bot cant set self server MODE to +R whenever it connects.
set init-server { putserv "MODE $botnick +R" }

I always set the MODE via DCC .dumb botnick mode +R

any idea? :(
t
tainted
Master
Posts: 239
Joined: Sun May 12, 2002 8:00 pm
Location: chicago
Contact:

Post by tainted »

I'm not really sure what that mode is, but does your bot have to identify with any type of service before that mode is set? If you have a script to identify with a service, the bot is probably trying to set the mode before being idented. If the bot does not run such a script or use any services, then I have no idea. :)
D
Darmoth
Master
Posts: 210
Joined: Sun Oct 07, 2001 8:00 pm
Location: old europe

Post by Darmoth »

+R is a dalnet channelmode, if it is set, only users using a registered nickname and who have identified to nickserv can join the channel than.
To change channelmodes you need to be at least operator there (of course). now it depends wich other modes are set. If the channel is set to accept only operators who have identified their nick to nickserv at first, than the bots also need a scrip that will do that for them.

All a bit off topic, but I hope I explained what +R is for :)
p
ppslim
Revered One
Posts: 3914
Joined: Sun Sep 23, 2001 8:00 pm
Location: Liverpool, England

Post by ppslim »

There are 3 sets of modes on IRC.

Channel setting modes (EG +i invite only)
Channel operator modes (EG +o channel op)
Nickname modes. (EG +i invisible)

The init-server setting is for running scripts, once the bot is connected to the server, and should only be used to set "Nickname modes".

The IRC command to do this is "MODE <nickname> <modes>"
Where nickname can only be your nickname (in this case, the bot), and modes are the modes you wish to set.

For channel modes, you use the following IRC syntax.
"MODE <channel> <modes> <arguments>"
Where channel is the channel to have the changes
modes are the modes to be changed, both channel and nickname
and arguments can be nicknames, ban masks, key (password) or limit amount.

To make the changes you want, you need to make channel changes, not nickname changes.

Tod o this, you should work with the chan-mode channel setting - see ".help chaninfo" and ".help chanset"
c
craze
Voice
Posts: 7
Joined: Fri May 17, 2002 8:00 pm
Contact:

Post by craze »

To clear things up, +R is a user mode on dalnet too.
From the dalnet docs:
The +R mode can be set by any connect client and does not allow a client who is not umode +r to message the client.
| G.A.Halle (Read error: EOF from signature)
s
sys
Voice
Posts: 19
Joined: Mon Sep 24, 2001 8:00 pm
Location: Middle East

Post by sys »

+R is a user mode on dalnet.
Registred nickname can only message user mode +R client.
That can prevent you from being flood by clone bot.

My question is why a bot cant set self MODE to +R when connect to a server with this syntax: set init-server { putserv "MODE $botnick +Ri-w" }
The only mode set are +i-w.

I hope my explanation is not confused :oops:
p
ppslim
Revered One
Posts: 3914
Joined: Sun Sep 23, 2001 8:00 pm
Location: Liverpool, England

Post by ppslim »

Do you have to be indentified to any services before setting this usermode?

If yes, this si the problem.

If no, then you may not be able to set this mode until you reach a certain part in the connection, which the eggdrop may have not made it to.
e
egghead
Master
Posts: 481
Joined: Mon Oct 29, 2001 8:00 pm
Contact:

mode +R dalnet

Post by egghead »

sys, in a test using the below code the bot did set the mode +R on a dalnet server.
Although in this example snippet the "bind evnt" is used, it also works when setting the +R in the init-server variable.

In your example, how did you find it doesn't work?

Code: Select all

bind evnt - init-server init:setmode
bind RAW - MODE raw:showmode

proc init:setmode { type } {
   global botnick
   putserv "MODE $botnick +R"
}

proc raw:showmode { from keyword text } {
   putlog "Got RAW $keyword from $from : $text"
}
Note: the putlog will display something like:
Got RAW MODE from botnick : botnick :+R
s
sys
Voice
Posts: 19
Joined: Mon Sep 24, 2001 8:00 pm
Location: Middle East

Post by sys »

ppslim, well first a bot set self mode to +R then identify to nickserv. It could be opposite also, but both not working.
But, it works fine with; set init-server { putserv "MODE $botnick +i-w" }
Eggheads,

The code works fine, and I got "Got RAW MODE from sonic : sonic :+R"
Is it fine if I use the script for a while instead of set init-server { putserv "MODE $botnick +Ri-w" }?
bind evnt - init-server init:setmode
bind RAW - MODE raw:showmode

proc init:setmode { type } {
global botnick
putserv "MODE $botnick +R"
}

proc raw:showmode { from keyword text } {
putlog "Got RAW $keyword from $from : $text"
}
:)
e
egghead
Master
Posts: 481
Joined: Mon Oct 29, 2001 8:00 pm
Contact:

Post by egghead »

The code works fine, and I got "Got RAW MODE from sonic : sonic :+R"
Is it fine if I use the script for a while instead of set init-server { putserv "MODE $botnick +Ri-w" }?
Sure, you can use the event binding instead of the init-server variable.
But you better remove the RAW binding as it will display any mode change on the channels your bot is on, which can be rather annoying :)

Since I wasn't able to reproduce your error (on se.dal.net), can you tell on which dalnet server you tried it?
s
sys
Voice
Posts: 19
Joined: Mon Sep 24, 2001 8:00 pm
Location: Middle East

Post by sys »

Since I wasn't able to reproduce your error (on se.dal.net), can you tell on which dalnet server you tried it?.
It didnt work for all DALnet servers.
p
ppslim
Revered One
Posts: 3914
Joined: Sun Sep 23, 2001 8:00 pm
Location: Liverpool, England

Post by ppslim »

You must be using non-RFC complient servers.

Read through the complete config file for information about NON-rfc servers.

This may help you.
s
sys
Voice
Posts: 19
Joined: Mon Sep 24, 2001 8:00 pm
Location: Middle East

Post by sys »

ppslim,
You must be using non-RFC complient servers.

Read through the complete config file for information about NON-rfc servers.

This may help you.
I do, set lowercase-ctcp 1
Your help was cool. :)
Locked