문제

I need to know a couple of things, concerning IRC servers that I couldnt directly find out over google (or werent clear enough for me to be sure if it actually works)

I'm working at a larger community site, and wanted to deliver an in-page chat. Since it would be a nice feature to let people access it from outside too, over their own clients, I tought implementing an IRC Server would be the best solution (probably dedicated, I'll have to teach myself a couple of things for that)

I plan to include a Web-based IRC client over an APE Client / Server. The problem is, I want to strip down the user rights, to disallow many functionalities that IRC would offer:

  • Change of nicknames: The user logs in over the Page login, and I'll automatically create an IRC auth for this user with that password. So basically, he would connect to the IRC client over a button. And after connecting, he shouldnt be able to change his nickname at all
  • Creating channels: I want the possibility to create channels, but not from 'normal' users. Basically, I would prefer to set up basic channels that are public, and if a user really creates an own channel, that one should be private and via invitation (is that possible?)
  • Private conversations: private conversations should be filtered out from the allaround IRC client, into separate 'in-browser-windows' that I create over JS. I guess I just have to filter the stuff coming from IRC - or is there a better solution to that?
  • Only 'registered' users have access: Like I said, if someone registers on the page, I would like to create an IRC 'account' for him. Users that arent registered on the page, cant access the IRC server at all (or get thrown out). Mainly to avoid spammers or bots from outside.

Is this stuff solvable over IRC? I've read some FAQ's and Instructions for IRC OP's and servers, but I couldnt find a clear answer - it seems that everyone can do pretty much everything - I would like to configure it in a way that user possibilities are more cut down. Basically, giving users the possibility to chat, but not more.

So the Question basically is, how possible / solvable this issues are allaround, or if I have to find other solutions for this.

도움이 되었습니까?

해결책

Have a look at different IRC services, example, ChanServ. Use Channel and User modes to set specific flags.

You can most likely do the following server side:

  • Forced nicknames (NickServ)
  • Allow only certain user types to create channels
  • Allow any user to join channel once it is created
  • Channels can have invite only flag +i
  • Private conversations is just a private message to a different user. If you need private conversations to have more than one user, you'll need to implement some logic for using channels privately
  • Creating registered users should be possible, and can probably be enforced by an IRC service like NickServ for instance.

Consider using CGI:IRC. It's a chat client in the browser which connects to IRC through the webserver. You can either restrict what the user is allowed to do from there, or restrict it server side.

Do some research on different IRCd's and see if you find one that supports what you need. Dancer-IRCd seems a popular choice and is included in the Ubuntu apt-get repository, however I'm not sure it supports all your needed functionality.


Another option is dropping the whole idea of IRC all together and implement your own chat client using either WebSocket API or Comet. There are also complete solutions for this available.

Examples of this:

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top