PHP Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming LanguagesPHP Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old June 10th, 2004, 05:36 AM
mmbs01 mmbs01 is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2004
Posts: 2 mmbs01 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Arrow IRC Bot

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.

Reply With Quote
  #2  
Old June 10th, 2004, 06:24 AM
bofla's Avatar
bofla bofla is offline
IBM Mainframe wannabe
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2004
Location: inside://php
Posts: 386 bofla User rank is Corporal (100 - 500 Reputation Level)bofla User rank is Corporal (100 - 500 Reputation Level)bofla User rank is Corporal (100 - 500 Reputation Level)bofla User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 23 h 3 m 12 sec
Reputation Power: 9
Send a message via ICQ to bofla
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.

Reply With Quote
  #3  
Old June 10th, 2004, 02:05 PM
kicken's Avatar
kicken kicken is offline
Wiser? Not exactly.
Dev Shed Demi-God (4500 - 4999 posts)
 
Join Date: May 2001
Location: Ft Myers, FL
Posts: 4,531 kicken User rank is General 4th Grade (Above 100000 Reputation Level)kicken User rank is General 4th Grade (Above 100000 Reputation Level)kicken User rank is General 4th Grade (Above 100000 Reputation Level)kicken User rank is General 4th Grade (Above 100000 Reputation Level)kicken User rank is General 4th Grade (Above 100000 Reputation Level)kicken User rank is General 4th Grade (Above 100000 Reputation Level)kicken User rank is General 4th Grade (Above 100000 Reputation Level)kicken User rank is General 4th Grade (Above 100000 Reputation Level)kicken User rank is General 4th Grade (Above 100000 Reputation Level)kicken User rank is General 4th Grade (Above 100000 Reputation Level)kicken User rank is General 4th Grade (Above 100000 Reputation Level)kicken User rank is General 4th Grade (Above 100000 Reputation Level)kicken User rank is General 4th Grade (Above 100000 Reputation Level)kicken User rank is General 4th Grade (Above 100000 Reputation Level)kicken User rank is General 4th Grade (Above 100000 Reputation Level)kicken User rank is General 4th Grade (Above 100000 Reputation Level)  Folding Points: 179512 Folding Title: Super Ultimate Folder - Level 1Folding Points: 179512 Folding Title: Super Ultimate Folder - Level 1Folding Points: 179512 Folding Title: Super Ultimate Folder - Level 1Folding Points: 179512 Folding Title: Super Ultimate Folder - Level 1Folding Points: 179512 Folding Title: Super Ultimate Folder - Level 1Folding Points: 179512 Folding Title: Super Ultimate Folder - Level 1
Time spent in forums: 1 Month 3 Weeks 6 Days 8 h 33 m 37 sec
Reputation Power: 1229
Send a message via ICQ to kicken Send a message via AIM to kicken Send a message via MSN to kicken
Quote:
Originally Posted by bofla
you want to use php to create an irc bot ? lol...
well, you can't.



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.

Reply With Quote
  #4  
Old June 10th, 2004, 03:18 PM
bofla's Avatar
bofla bofla is offline
IBM Mainframe wannabe
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2004
Location: inside://php
Posts: 386 bofla User rank is Corporal (100 - 500 Reputation Level)bofla User rank is Corporal (100 - 500 Reputation Level)bofla User rank is Corporal (100 - 500 Reputation Level)bofla User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 23 h 3 m 12 sec
Reputation Power: 9
Send a message via ICQ to bofla
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

Reply With Quote
  #5  
Old June 10th, 2004, 03:35 PM
kicken's Avatar
kicken kicken is offline
Wiser? Not exactly.
Dev Shed Demi-God (4500 - 4999 posts)
 
Join Date: May 2001
Location: Ft Myers, FL
Posts: 4,531 kicken User rank is General 4th Grade (Above 100000 Reputation Level)kicken User rank is General 4th Grade (Above 100000 Reputation Level)kicken User rank is General 4th Grade (Above 100000 Reputation Level)kicken User rank is General 4th Grade (Above 100000 Reputation Level)kicken User rank is General 4th Grade (Above 100000 Reputation Level)kicken User rank is General 4th Grade (Above 100000 Reputation Level)kicken User rank is General 4th Grade (Above 100000 Reputation Level)kicken User rank is General 4th Grade (Above 100000 Reputation Level)kicken User rank is General 4th Grade (Above 100000 Reputation Level)kicken User rank is General 4th Grade (Above 100000 Reputation Level)kicken User rank is General 4th Grade (Above 100000 Reputation Level)kicken User rank is General 4th Grade (Above 100000 Reputation Level)kicken User rank is General 4th Grade (Above 100000 Reputation Level)kicken User rank is General 4th Grade (Above 100000 Reputation Level)kicken User rank is General 4th Grade (Above 100000 Reputation Level)kicken User rank is General 4th Grade (Above 100000 Reputation Level)  Folding Points: 179512 Folding Title: Super Ultimate Folder - Level 1Folding Points: 179512 Folding Title: Super Ultimate Folder - Level 1Folding Points: 179512 Folding Title: Super Ultimate Folder - Level 1Folding Points: 179512 Folding Title: Super Ultimate Folder - Level 1Folding Points: 179512 Folding Title: Super Ultimate Folder - Level 1Folding Points: 179512 Folding Title: Super Ultimate Folder - Level 1
Time spent in forums: 1 Month 3 Weeks 6 Days 8 h 33 m 37 sec
Reputation Power: 1229
Send a message via ICQ to kicken Send a message via AIM to kicken Send a message via MSN to kicken
Quote:
Originally Posted by bofla
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


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.

Reply With Quote
  #6  
Old June 10th, 2004, 03:46 PM
bofla's Avatar
bofla bofla is offline
IBM Mainframe wannabe
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2004
Location: inside://php
Posts: 386 bofla User rank is Corporal (100 - 500 Reputation Level)bofla User rank is Corporal (100 - 500 Reputation Level)bofla User rank is Corporal (100 - 500 Reputation Level)bofla User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 23 h 3 m 12 sec
Reputation Power: 9
Send a message via ICQ to bofla
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

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesPHP Development > IRC Bot


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump




 Free IT White Papers!
 
How to Present Effectively Online
This white paper offers practical and actionable advice on the key steps that any presenter should consider as they plan and execute a Webinar or online meeting.

 
Open Source Security Myths
Open Source Software (OSS) is computer software whose source code is available to the general public with relaxed or non-existent intellectual property restrictions (or arrangement such as the public domain), and is usually developed with the input of many contributors.

 
Power and Cooling Capacity Management for Data Centers
This paper describes the principles for achieving power and cooling capacity management.

 
Scalable, Fault-Tolerant NAS for Oracle - The Next Generation
For several years NAS has been evolving as a storage alternative for Oracle databases, and for good reason: NAS is quite often the simplest, most cost-effective storage approach for Oracle. Learn about the benefits that HP's approach to scalable NAS brings to Oracle environments in this comprehensive white paper.

 
Understanding Web Application Security Challenges
This white paper discusses many common threats and preventive measures for Web application security, and explains what you can do to help protect your organization.

 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 




© 2003-2009 by Developer Shed. All rights reserved. DS Cluster 4 Hosted by Hostway
Stay green...Green IT