118 Chapter 3 Application Design: A Real-Life Example
118 Chapter 3 Application Design: A Real-Life Example However,this method can be used to emulate user bans.The common bans for IRC, namely K-lines and G-lines (local and global bans of users), cannot be used with a Web-based chat system,as all connections originate from the Web server.The only ban-able address would be the address of the Web server, which would completely ban the whole interface from the network.To still be able to filter out special users, connections should be evaluated at the PHP level. Database Level The database level is a totally different approach. Clients are allowed to log in and chat, but their messages and session information are filtered in the database. Either an external tool or the chat code itself would check for the user to be allowed to say or do something and, based on this info, allow his/her messages to be inserted into the database or not. But this strategy requires a very tight integration into the main chat code, is not very flexible (and kind of clumsy), and is inelegant to implement. IRC Level IRC provides native administration features built into the server code and network protocol (we hope you read the RFC and are familiar with these possibilities). Administration can even be done by regular users.Three levels are available: n Channel operators. These operators have administrative control over channels. They can kick users, mute them,ban them,make other users into operators, and such (this level is available to all users). n IRC operators. These operators have administrative control over the network (but not channels).They can kill users from the net,ban them,establish network links, and so on (this level is only available to special users). n Services. Services have administrative control over channels but no control over the network,and are not able to perform like regular users.They also require a special login procedure (this level is only available to special users and is meant for automated clients). As you can see, administration at IRC level can be done using a client running separately from the main chat system.A separate client with IRC operator and channel operator status would give the ideal combination of features that we need an administration system to have. Basically, only IRC operator status is needed initially, since as soon as the administration client has gained IRC operator status, it can gain channel operator status everywhere by killing all users from a channel.This is not a very nice method, but more effective and versatile than patching the IRC server code to give IRC operators equal rights to channel operators.
Note: If you are looking for good and high quality web space to host and run your application check Lunarwebhost PHP Web Hosting services