|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| ||||||||||||||||||||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
I have the following specifications for a IRC Bot I would like... I have some idea's but I would love some help in getting this programed.
Here's how the bot moderator works: 1) You register with the bot using your registered nick. No password needed since you have already identified with nickserv. You have to enter the channel with the nick you used with the robot. 2) You then can rate other members in the channel like this: /msg bot trust mynick or /msg bot distrust nick Depending on your own trust rating in the channel, your trust/distrust will get stronger/weaker. I will have a trust rating of 100. New users will have a trust rating of 10. Passing on trust must take several factors into consideration: a) Number of people who trust/distrust you b) Strength of that trust c) Length of trust chain Obviously, if many people with a high trust rating link to you, you will have a higher level of trust. Trust is not accumulative so if ten people with ratings of 90 trust you, you won't get 900 points -- all you get is a 90 rating with enough protection to withstand ten other 90 rated people who distrust you. Active participants in the channel constitute the working set for voting. If someone is not active, they cannot be affected by a vote. A majority of people voting will enact a devoice or a wildcard ban. The majority refers to trust rating. So if someone comes in and is extremely problematic, requiring a ban, then robot will be asked to announce a poll, and people msg the bot as follows: /msg bot ban mynick /msg bot dont ban nick People who become active during voting can vote. Those who are newly joined cannot vote. In addition to the voting mechanism, the bot will also be able to detect flooding behavior, join floods, and other repetitive behavior. The limit will be set very high so the channel will have to endure some abuse, but we do not want to accidently ban someone who is a fast typist. We'll prefer devoicing to banning unless a repitive offense occurs (ie join floods, nick fooods). Hopefully, chanserv/nickserv can detect this sort of thing and help us out. |
|
#2
|
||||
|
||||
|
you want to use php to create an irc bot ? lol...
well, you can't. i suggest you take a look on The Parzylic Eggdrop Project from http://www.Planet-Source-Code.com/v...Id=807&lngWId=8 for installing Eggdrop bot without shell. |
|
#3
|
||||
|
||||
|
Quote:
Just why not? PHP is perfectly capable of creating an IRC bot as well as many other non-web stuff. For instance, see the long-term project in my sig. PHP has a downfall of being seen as a web-only, web-server required HTMl producing scripting language when in reality it can be used for a vast number of things. Using ncurses and readline one can create a wide varity of command line/terminal base applications such as install scripts, IRC clients, browsers, etc. Using the socket functions and process control functions one can create a number of daemons, servers, or clients (including an IRC bot). People need to start realizing that PHP is NOT WEB ONLY and can be used for a wide varity of applications. mmbs01 You might check out my wiser bot project (see sig). You can use it as the IRC layer and then add th functionality you want through a module. That way you won't have to worry so much about the IRC interaction, you can focus specificlly on what you want the bot to do while online.
__________________
Spidermonkey Tutorial; Fight me: http://aoeex.mybrute.com http://www.aoeex.com/gmap.php - Put yourself on the map (Now Updated!) Last edited by kicken : June 10th, 2004 at 02:10 PM. |
|
#4
|
||||
|
||||
|
but it's more convenient to use C/C++ to create such application. i know php is more then web, but ... there are so many other programming languages that will do such things...this way you rely on webserver, but what if it fails ? system is less likely to fail
![]() |
|
#5
|
||||
|
||||
|
Quote:
Yes, C/C++ would probably be better in more ways than one, but PHP can be eaiser, and for the most part is not much worse (little slower, and slighly more limited). PHP's downfalls come with the ease though. Sometimes it's much harder to get something in C or C++ to work on a shared hosting environment too and php can simplify that. ...this way you rely on webserver, but what if it fails ? system is less likely to fail ![]() My particular solution to the IRC Bot in PHP question does rely on a web-server, but not all do. It is fairly easy to make an IRC bot which has absolutly no connection to the server and would be run in the same way that any C bot would be (php -q bot.php on the command line). In my experience trying to create the bot in that manner is more limiting in what you can do though (that's where c is better). For instance, to make changes to the bot, you have to completely shutdown the bot, make the changes, and then re-start it. By relying on the server like I do to execute commands I'm able to edit virtually every part of the bot and never have to disconnect from irc and reload the bot for the changes to take effect (only have to for "core changes"). This way works wonderfully on everything I've tested with (which isn't much, win/linux w/ apache (various versions)) One way I experiemeted with in the past which allowed the same benifits, but didn't rely on the server, was to use system commands and execute other php files for commands. This worked wonderfully on linux, but would randomly fail on windows, and seemed to fail fairly often. All in all, yes C or C++ would be more suited for the task at hand, but PHP is capable, and there really are not that many reasons why it should be dismissed as a possiblity. It will work, most of the time reliably, and is eaiser to roll out your own customized version of a bot. |
|
#6
|
||||
|
||||
|
well...
its all ok...but but but...its a matter of choice, nothing more. if i were gonna write something like this, i would turn to c++ syntax is similar to php, but more complicated as it is a real programming language but never the less, i support all kind of new way of developing existing applications ![]() |
![]() |
| Viewing: Dev Shed Forums > Programming Languages > PHP Development > IRC Bot |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|