Register - Login
Views: 99847761
Main - Memberlist - Active users - Calendar - Wiki - IRC Chat - Online users
Ranks - Rules/FAQ - Stats - Latest Posts - Color Chart - Smilies
05-04-22 01:53:20 AM
Jul - Computers and Technology - C# IRC Bot New poll - New thread - New reply
Next newer thread | Next older thread
Zero One
5170
And as we fall the spirit carries on,
That a hero'll come and save us all,
As we call the ones we left below,
We all dream of the day we rise above
Level: 129


Posts: 4341/5173
EXP: 24573935
For next: 475719

Since: 05-24-10

From: Delta Quadrant

Since last post: 1.6 years
Last activity: 131 days

Posted on 01-19-13 02:32:14 PM (last edited by Zero One at 01-20-13 05:57:59 PM) Link | Quote
Over the past year or so, I've been working on an IRC bot in C# which is in use in a couple of channels. However, since this is pretty much the first serious program I've ever written, a lot of it is most likely terrible and I'd like some help improving it and adding more functionality. At the top of my list is having an RSS reader that can be customised per channel. I'd also like it to have the ability to store messages for other people, but before I do all of that, I'd like to make it more efficient and easier. Right now, it's sending messages by stringing returns (as in, I'd call Send() and then give it a function as an argument and output whatever that function returns, even if that function calls other functions), and I'm sure that's not the best way to do it. Any assistance would be much appreciated. Below is a list of pastebins of all the classes in my bot:
Program.cs
IRCIO.cs
Commands.cs
IRCMessageGen.cs
Logging.cs
Choose.cs
Say.cs
Time.cs
Later.cs (non-functioning message service)

I have been thinking of a queuing system of sending messages to channels; that way, I would be able to return multiple messages in one go. Also, I'm thinking that using some sort of database to store the RSS feeds and messages might be a smart thing to do. Any recommendations you have will great, even if it's looking into another language. And if you're concerned, this isn't something I'm just going to suddenly drop. I enjoy working on this bot, so improving it is pretty important to me.

EDIT: I now have a Queue system working. Now I just need to learn what I can do with Queues. I saw that there is a way to synchronise a Queue, so I was wondering if I can pass down multiple copies of the same Queue, allowing me to have multiple strings placed in a Queue from one or more functions.

____________________
This is a Heisenberg post. I know I posted this really fast, but I don't know where...
My YouTube Channel
Crossover - The Comic!
My Livestream. Check it!
3DS Code: 2879-0110-5138

MainMemory
Member
Level: 13


Posts: 10/28
EXP: 8856
For next: 1411

Since: 07-22-12


Since last post: 6.3 years
Last activity: 4.9 years

Posted on 01-20-13 10:12:47 PM (last edited by MainMemory at 01-21-13 11:11:34 AM) Link | Quote
I have written an IRC bot in C# which, among many other things, has an RSS/Atom reader and message queue. If you want you can look at the source code here.
Zero One
5170
And as we fall the spirit carries on,
That a hero'll come and save us all,
As we call the ones we left below,
We all dream of the day we rise above
Level: 129


Posts: 4343/5173
EXP: 24573935
For next: 475719

Since: 05-24-10

From: Delta Quadrant

Since last post: 1.6 years
Last activity: 131 days

Posted on 01-20-13 10:18:54 PM Link | Quote
I can't seem to connect to the server, unfortunately. I'll try again later on.

____________________
This is a Heisenberg post. I know I posted this really fast, but I don't know where...
My YouTube Channel
Crossover - The Comic!
My Livestream. Check it!
3DS Code: 2879-0110-5138

Sukasa

Level: 123


Posts: 3994/4326
EXP: 20937223
For next: 294043

Since: 07-07-07


Since last post: 1.1 years
Last activity: 1.1 years

Posted on 01-20-13 10:30:34 PM Link | Quote
Any way we could get the .sln and .csproj files?

____________________
Zero One
5170
And as we fall the spirit carries on,
That a hero'll come and save us all,
As we call the ones we left below,
We all dream of the day we rise above
Level: 129


Posts: 4344/5173
EXP: 24573935
For next: 475719

Since: 05-24-10

From: Delta Quadrant

Since last post: 1.6 years
Last activity: 131 days

Posted on 01-20-13 10:36:15 PM (last edited by Zero One at 01-20-13 10:37:38 PM) Link | Quote
The .sln and the .csproj. The IRCIO.cs pastebin has also been updated to include message queueing. So far, ZeroBot can connect to Esper just fine, but I haven't tested any other servers.

____________________
This is a Heisenberg post. I know I posted this really fast, but I don't know where...
My YouTube Channel
Crossover - The Comic!
My Livestream. Check it!
3DS Code: 2879-0110-5138

Xenesis

Roy Koopa
Actually a Doctor
Level: 101


Posts: 1997/2732
EXP: 10487426
For next: 230249

Since: 07-28-07

Pronouns: She/Her
From: Orange Star's Retirement Villa

Since last post: 10 days
Last activity: 16 hours

Posted on 01-20-13 10:44:36 PM Link | Quote
I'll give it a try on WWN's IRC channel which is on a different server and tell you how it goes.
MainMemory
Member
Level: 13


Posts: 11/28
EXP: 8856
For next: 1411

Since: 07-22-12


Since last post: 6.3 years
Last activity: 4.9 years

Posted on 01-21-13 12:54:11 AM Link | Quote
Ack, wasn't thinking. I'm not currently at home, so the router isn't set up to forward port 80 to my computer, and my website has suddenly gone offline, so that's not an option either.
Zero One
5170
And as we fall the spirit carries on,
That a hero'll come and save us all,
As we call the ones we left below,
We all dream of the day we rise above
Level: 129


Posts: 4345/5173
EXP: 24573935
For next: 475719

Since: 05-24-10

From: Delta Quadrant

Since last post: 1.6 years
Last activity: 131 days

Posted on 01-21-13 12:55:37 AM Link | Quote
Not a problem; I'll catch it when it's accessible.

____________________
This is a Heisenberg post. I know I posted this really fast, but I don't know where...
My YouTube Channel
Crossover - The Comic!
My Livestream. Check it!
3DS Code: 2879-0110-5138

MainMemory
Member
Level: 13


Posts: 12/28
EXP: 8856
For next: 1411

Since: 07-22-12


Since last post: 6.3 years
Last activity: 4.9 years

Posted on 01-21-13 11:11:07 AM Link | Quote
Here.
Next newer thread | Next older thread
Jul - Computers and Technology - C# IRC Bot New poll - New thread - New reply


Rusted Logic

Acmlmboard - commit 47be4dc [2021-08-23]
©2000-2022 Acmlm, Xkeeper, Kaito Sinclaire, et al.

30 database queries, 2 query cache hits.
Query execution time: 0.100680 seconds
Script execution time: 0.033024 seconds
Total render time: 0.133704 seconds