Arthur, i solved my login problems. It was an SDL socket problem. So, i created a brand new socket management on my own and now everything works fine. I am actually enjoying checking the various client commands and relative server responds, and i have two questions for you, i believe you can help. On Channel_Create you actually create one channel (&Server) in your server. Then you have another method Channel_InitPredefined(), which created a list of 'predefined' channels contained into a GLOBAL array Conf_Channels. I actually don't understand where (and if) this array is populated. Second question regards messages in chan. Actually the IRC protocol talks about PRVMSG but not about messages that client sends to chan. Is there a prefix or is a server feature, which broadcasts the message to all the clients belonging to the same chan? Tnx again for your help, and congrats for the IRC Server developed. Cheers alex
Hello Alessandro!
Am 03.05.2012 um 15:20 schrieb Alessandro Alessio:
i solved my login problems. It was an SDL socket problem. So, i created a brand new socket management on my own and now everything works fine.
Great :-)
I am actually enjoying checking the various client commands and relative server responds, and i have two questions for you, i believe you can help.
On Channel_Create you actually create one channel (&Server) in your server. Then you have another method Channel_InitPredefined(), which created a list of 'predefined' channels contained into a GLOBAL array Conf_Channels. I actually don't understand where (and if) this array is populated.
The „predefined“ channels are read in from the configuration file in conf.c, function Handle_CHANNEL(). And they become created by the function Channel_InitPredefined() in channel.c, which in turn gets called from the main() function in ngircd.c.
Second question regards messages in chan. Actually the IRC protocol talks about PRVMSG but not about messages that client sends to chan. Is there a prefix or is a server feature, which broadcasts the message to all the clients belonging to the same chan?
The PRIVMSG command is used to send to individual users and to channels. The syntax is:
PRIVMSG <target> :<message>
and <target> can be a nick name like „mynick“/„your nick“ or channel names like „#chan“/„&local“ etc.
Regards Alex
Alexander,
The „predefined“ channels are read in from the configuration file in conf.c, function Handle_CHANNEL(). And they become created by the function Channel_InitPredefined() in channel.c, which in turn gets called from the main() function in ngircd.c.
I see that predefined channels need to be defined in the config file (i.e.: ngircd.conf) filling, for each channel, the form:
[Channel] Name = Topic = Modes = Key = KeyFile = MaxUsers = But how can i give voice to users when they log in? And how can i provide +o to certain users automatically when they log in? Tnx, alex
Hi Alessandro!
Am 07.05.2012 um 14:28 schrieb Alessandro Alessio:
But how can i give voice to users when they log in? And how can i provide +o to certain users automatically when they log in?
In short: you can’t.
If you want to auto-op or auto-voice someone, you have to use some sort of Bot or IRC services. ngIRCd can’t do it on its own.
Exception: IRC operators (user mode +o, identified by OPER command) become channel ops automatically when joining persistent (channel mode +P) channels.
Regards Alex
Sorry to bother you but i'm a bit confused.
About +o: Ok to use a BOT for auto-op. But with ngircd, when a user joins an empty channel, or creates a new channel, it doesn't get the +o. So i am actually not able to create a chan operator with ngircd. Actually when i use mIrc, if a join an empty channel i get automatically the +o into that chan. So, if i join as a bot, i get myself the +o, and if the bot is programmed to gives +o to certain users, i am able to auto-op my users. tnx alex
--- Lun 7/5/12, Alexander Barton alex@barton.de ha scritto:
Da: Alexander Barton alex@barton.de Oggetto: Re: [ngIRCd-ML] Channel Management A: "Alessandro Alessio" alexoffspring@yahoo.com Cc: ngircd-ml@arthur.barton.de Data: Lunedì 7 maggio 2012, 13:58
Hi Alessandro!
Am 07.05.2012 um 14:28 schrieb Alessandro Alessio:
But how can i give voice to users when they log in? And how can i provide +o to certain users automatically when they log in?
In short: you can’t.
If you want to auto-op or auto-voice someone, you have to use some sort of Bot or IRC services. ngIRCd can’t do it on its own.
Exception: IRC operators (user mode +o, identified by OPER command) become channel ops automatically when joining persistent (channel mode +P) channels.
Regards Alex
On Mon, May 07, 2012 at 07:14:07AM -0700, Alessandro Alessio wrote:
About +o: Ok to use a BOT for auto-op. But with ngircd, when a user joins an empty channel, or creates a new channel, it doesn't get the +o. So i am actually not able to create a chan operator with ngircd.
ngIRCd behaves like other IRC daemons regarding "non persistent" channels (when +P is not set): the first user joining the channel (the "founder", "creator", whatever) gets channel user mode +o ("channel operator") set. All subsequent users joining this channel don't.
If the channel is "persistent" (channel mode +P is set; which it is automatically if it is defined using the configuration file), the channel exists even when nobody is a member of it -- so there is no "founder" and therefore ngIRCd never sets channel user mode +o on any user but IRC operators: all IRC operators get the +o channel mode when joining a persistent (+P) channel.
So you have a few possibilities:
1. use a predefined channel and a Bot that becomes IRC operator before joining that channel,
2. use IRC services like Anope (1.9.6) or Atheme (development branch) that act like an other server and IRC Ops in the network.
Actually when i use mIrc, if a join an empty channel i get automatically the +o into that chan.
This has nothing to do with your client.
So, if i join as a bot, i get myself the +o, and if the bot is programmed to gives +o to certain users, i am able to auto-op my users.
And that's how it works using ngIRCd -- if you don't use "persistent" channels.
Regards Alex
Alexander thank you for your exhaustive answer. But actually my perplexity was different, and bad explained (my fault) As i'm experiencing, it's not possible to set +o to other users than chan-founder or creator. Or better, an operator "Can't get/set mode for other users". Which actually sounds strange to me. As far as i remember, an Operator can op other users.
--- Lun 7/5/12, Alexander Barton alex@barton.de ha scritto:
ngIRCd behaves like other IRC daemons regarding "non persistent" channels (when +P is not set): the first user joining the channel (the "founder", "creator", whatever) gets channel user mode +o ("channel operator") set. All subsequent users joining this channel don't.
If the channel is "persistent" (channel mode +P is set; which it is automatically if it is defined using the configuration file), the channel exists even when nobody is a member of it -- so there is no "founder" and therefore ngIRCd never sets channel user mode +o on any user but IRC operators: all IRC operators get the +o channel mode when joining a persistent (+P) channel.
So you have a few possibilities:
1. use a predefined channel and a Bot that becomes IRC operator before joining that channel,
2. use IRC services like Anope (1.9.6) or Atheme (development branch) that act like an other server and IRC Ops in the network.