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
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.
+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
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"
+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.
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?
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"
}
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?