DeadEd.com
IRC Bots, Java Game Query and Control Libraries, and More ...
Sign Up!
Login
Welcome to DeadEd.com
Monday, August 21 2017 @ 01:25 AM CDT

 Forum Index > Jibble.org > PircBot
 Help with onmessage command
 |  Printable Version
By: ToddP (offline) on Tuesday, December 20 2011 @ 05:58 AM CST (Read 9405 times)  
ToddP

Hello, I'm new to PIRCBot.

 

I need to get the bot to reconginze the first word as the command and anything else after it as "user input".

I know how to get the bot to respond to the onmessage event.

 

Right now this is what happens:

 

ToddP> !repeat hello world

Bot> !repeat hello world

 

This is what I need to happen:

 

ToddP> !repeat hello world

Bot> hello world

 

Any help with this would be greatley appreicated.


Forum Newbie
Newbie

Status: offline

Registered: 12/20/11
Posts: 1

Profile Email    
   
By: DeadEd (offline) on Thursday, December 22 2011 @ 07:40 AM CST  
DeadEd

You will need to get familiar with the Java String class to do things with PircBot.  Methods such as startsWith, substring and equalsIgnoreCase help a huge amount (and will help you do what you want).

 

There are also some PircBot Demos for you to look at as well to get an idea of at least one way of doing some of the common tasks bot authors want to do.


Forum Moderator
Moderator

Status: offline

Registered: 06/01/04
Posts: 602

Profile Email Website  
   



 All times are CDT. The time is now 01:25 AM.
Normal Topic Normal Topic
Locked Topic Locked Topic
Sticky Topic Sticky Topic
New Post New Post
Sticky Topic W/ New Post Sticky Topic W/ New Post
Locked Topic W/ New Post Locked Topic W/ New Post
View Anonymous Posts 
Able to Post 
Filtered HTML Allowed 
Censored Content 

My Account





Sign up as a New User
Lost your password?

What's New

Stories

No new stories

Comments last 2 days

No new comments

Files last 14 days

No new files
No new comments

Links last 2 weeks

No new links