mIRC Home    About    Download    Register    News    Help

Print Thread
Page 1 of 2 1 2
Joined: Jan 2004
Posts: 79
C
cmad Offline OP
Babel fish
OP Offline
Babel fish
C
Joined: Jan 2004
Posts: 79
I don't know if any of you remember me, but I decided to finally code my C++ IRC bot. Someone (not from here) suggested that I make my bot open-source. I told him that the C++ IRC Lib WOULD be made opensource but I wasn't sure about the bot. Making it opensource seems like a good idea but I have a couple of concerns:

1) Security flaws.

See I want my bot to have the following user modes (sorted by power):

- Bot root (that is me and my access level on the bot will be the same, as currently planned, as with the bot global operators)
- Bot global operator (users that will be able to control the bot, and and can specify new bot global operators and remove old ones)
- Bot local operator (users that will be able to control the bot in a specified channel)

The thing is that if I make my bot opensource, anyone that has the bot would be able to make himself the boot root or a bot global operator or w/e... That way all the nice rank design would be screwed.

Any ideas how I might prevent this?

2) Bot configuration

There are two choices. Either configure stuff in config files or change bot source. If the bot is closed-source then only the "config files" thing would be available (remember closed source means better security). On the other hand in open-source either editing bot code or configuring config files would be available. Do you think the bot should be configed by editing code or through config files? See one reason I want to make my own bot was that I characterize config files as scripts and scripts (according to me) are less powerful that real time programming. But the pro of config files is that I can make my bot closed-source.

-----

I know it's a long message but I would really appreciate some feedback.

Last question: Do you think I should make that C++ IRC bot open-source?

BTW: I have decided that the lib the bot will use (C++ IRC lib) is going to be open-source...


Thanks in advance,
cmad


My ally is the compiler, and a powerful ally it is!
Joined: Feb 2003
Posts: 2,812
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2003
Posts: 2,812
The thing is that if I make my bot opensource, anyone that has the bot would be able to make himself the boot root or a bot global operator or w/e... That way all the nice rank design would be screwed.

The person installing your bot should be able to play god all he wants. So what if he gives himself root? It's his bot on his machine.

If the bot is closed-source then only the "config files" thing would be available (remember closed source means better security).

Microsoft Windows == Closed Source
Linux Operating System == Open Source

You tell me which one is known for better security?

Perhaps you should download eggdrop and thumb through its source, before tackling a bot of your own. You should note that eggdrop is open source, uses config files, and is the most used and secure ircbot known to the web. This isn't because it's closed source, which it isn't.

Closed Source is simply sweeping one's flaws under the carpet.

- Raccoon


Well. At least I won lunch.
Good philosophy, see good in bad, I like!
Joined: Jan 2004
Posts: 79
C
cmad Offline OP
Babel fish
OP Offline
Babel fish
C
Joined: Jan 2004
Posts: 79
----------
The thing is that if I make my bot opensource, anyone that has the bot would be able to make himself the boot root or a bot global operator or w/e... That way all the nice rank design would be screwed.

The person installing your bot should be able to play god all he wants. So what if he gives himself root? It's his bot on his machine.

----------

It's not really playing. If you get root access to the bot you can kick/ban/everything whoever you want from w/e channel you want. That's not good now is it wink

----------
If the bot is closed-source then only the "config files" thing would be available (remember closed source means better security).

Microsoft Windows == Closed Source
Linux Operating System == Open Source

You tell me which one is known for better security?

----------

Yeah I myself have Linux and I confess that Linux is waaaaay more secure than Windows. Still you didn't tell me what you would prefer. Making config files for the bot or going to modify the source of the bot? I myself would go do the 2nd but it's the majority that counts. Or maybe I can just give ppl an option to decide what they wanna do...

----------
Perhaps you should download eggdrop and thumb through its source, before tackling a bot of your own. You should note that eggdrop is open source, uses config files, and is the most used and secure ircbot known to the web. This isn't because it's closed source, which it isn't.

Closed Source is simply sweeping one's flaws under the carpet.

----------

I got an about 2 or 3 months old eggdrop; i'll check it out

Thanks

Last edited by cmad; 05/03/04 11:53 AM.

My ally is the compiler, and a powerful ally it is!
Joined: Feb 2003
Posts: 2,812
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2003
Posts: 2,812
It's not really playing. If you get root access to the bot you can kick/ban/everything whoever you want from w/e channel you want. That's not good now is it?

Shouldn't the bot's owner have the ability to kick/ban/whoever he wants? Open Source only permits the OWNER to do things like this. The OWNER has that ability already, and doesn't need your bot to gain that kind of access.

And yes, Config files are nice.

- Raccoon


Well. At least I won lunch.
Good philosophy, see good in bad, I like!
Joined: Jan 2004
Posts: 79
C
cmad Offline OP
Babel fish
OP Offline
Babel fish
C
Joined: Jan 2004
Posts: 79
Hmm yeah I guess the bot owner should set up the ops himself.

/me deletes the current ranking system

okay i'm gonna add configs

EDIT: well with a bit of change the old ranking system should be ok I guess

Last edited by cmad; 05/03/04 01:14 PM.

My ally is the compiler, and a powerful ally it is!
Joined: Mar 2003
Posts: 187
S
Vogon poet
Offline
Vogon poet
S
Joined: Mar 2003
Posts: 187
let me know when you release the LIB

Joined: Jan 2004
Posts: 79
C
cmad Offline OP
Babel fish
OP Offline
Babel fish
C
Joined: Jan 2004
Posts: 79
okay, but it's gonna be only C++ wink Now if someone could help me make a similar one for C i'd be grateful. But we'll talk about that after i'm done with the c++ lib wink


My ally is the compiler, and a powerful ally it is!
Joined: Dec 2002
Posts: 39
V
Ameglian cow
Offline
Ameglian cow
V
Joined: Dec 2002
Posts: 39
This is a sidenote because this made me feel depressed, please ignore me:

Yet another example of an application where C(++) is entierly the wrong language to use, which just defaults to the language because someone somewhere decided it's 'manly' to use C++ for everything. It's just so absolutely depressing that this attitude remains everywhere and that people are so largely ignorant of alternatives and why some are superior for almost any applications. The problem isn't that C++ (or C) exists, and that it shouldn´t ever be used, it´s that it's treated as some sort of default catch-all solution in so many places where it's clearly the inferior choice. This sucks for a language nut as me. C++ is a baroque low-level language, and there is _no_ good reason to use it for such high-level stuff as this. Sigh :-/

Joined: Apr 2003
Posts: 210
S
Fjord artisan
Offline
Fjord artisan
S
Joined: Apr 2003
Posts: 210
Well, I think the attitude is especially prevelant among scripters as they want something that is totally opposite to mIRC Script. A low level language like C++ is great to boost your credibility, init.

Furthermore, A lot of scripters see it as the only language capable of making DLL's. I personally always favoured Delphi, which can produce machine code as fast as C++ (according to lab tests, not just me), And is much easier and natural to work with. I think the fact that it's easier is a big no-no for mirc'ers, They want everyone to know that they can use archaic and complicated langauge, Not just an easy one.

Joined: Dec 2002
Posts: 2,962
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 2,962
Well there typically is a bonus in making a DLL in C over Delphi - file size. In the past I've made a mIRC DLL in Delphi, C++, and C and the filesize dropped by a third for each language respectively.

Of course vague is right about the app in this thread, there are a dozen different languages that could've made an IRC bot in about a tenth of the code that was much more adaptable, cross-compatible, and re-useable - all without any relevant hit to performance.


Spelling mistakes, grammatical errors, and stupid comments are intentional.
Joined: Apr 2003
Posts: 210
S
Fjord artisan
Offline
Fjord artisan
S
Joined: Apr 2003
Posts: 210
Well, You can reduce size of a delphi DLL by not using the VCL. Just by using windows API, or even inline ASM. The smallest I have made a Delphi DLL is 5K. I think that is acceptable.

I believe this applies to C++ also, If you want those small files you will be using pure API mostly, And not the higher level wrappers.


Joined: Jan 2004
Posts: 79
C
cmad Offline OP
Babel fish
OP Offline
Babel fish
C
Joined: Jan 2004
Posts: 79
Just look at the stats... Look at what position C and C++ are... What language should I have used? By the way, I haven't started making the bot yet, because I have started making an IRC ToolKit in C++, which I registered in SourceForge. Anyway, I don't see why C++ is the wrong lang to use. Still, if you want to use a different lang for your bot, there's no-one preventing you from doing it. Good luck, you have my support if you decide to do it smile

And now referring to your comments:

Quote:
where C(++) is entierly the wrong language to use


No it's not.

Quote:
people are so largely ignorant of alternatives and why some are superior for almost any applications.


Give me an example. I'd REALLY like to know what languages are superior for almost any apps. IMHO no lang can do that.

Quote:
it shouldn´t ever be used


Again I'd really love to know what language you have in mind wink And please reconsider if you're gonna say C# or something.

Quote:
it´s that it's treated as some sort of default catch-all solution in so many places


No it's not. C++ (or C) is not the best for everything. As a matter of fact, in some stuff it SUCKS. Like string handling (yeah I mean std::string for C++ and char * for C). And no; ppl don't use C/C++ for everything (or most of the stuff). There are MANY other equally good languages out there. I just happen to like C++ the best at the moment.


My ally is the compiler, and a powerful ally it is!
Joined: Jan 2004
Posts: 79
C
cmad Offline OP
Babel fish
OP Offline
Babel fish
C
Joined: Jan 2004
Posts: 79
Quote:
I personally always favoured Delphi


Yup Delphi is my 2nd favorite. Especially for GUI stuff. But I don't use Delphi much lately because of my migration to the *NIX world. Delphi is VERY VERY good.

Quote:
which can produce machine code as fast as C++


Due to the GUI libs, some times it may take a bit longer but it's not noticable. Delphi produces greatly optimized executables. As I said, Delphi is a very good lang.

Quote:
they can use archaic and complicated langauge, Not just an easy one.


First of all, C++ is not archaic and complicated. Just because you favor another lang, doesn't mean the others suck (not referring only to saxon).

And Delphi can get as tough to code in as you can want it to be. If you just write simple 1+1 apps, then yeah it's simple. As a matter of fact, it's not a lot simpler than C/C++. It's just the syntax and grammar that change a bit. Hey I started off Pascal, then went to Delphi and then C/C++. The migration from Delphi to C wasn't tough. But to C++ I needed to read some books about C++ stuff (the STL specifically).


My ally is the compiler, and a powerful ally it is!
Joined: Dec 2002
Posts: 39
V
Ameglian cow
Offline
Ameglian cow
V
Joined: Dec 2002
Posts: 39
Sigh, the very fact that you can't answer these questions yourself, is the problem. I'm not going to try to convince you, I don't care to. But I'd like to see more awareness of what C++ really is, what it's strengths are, and what it's weaknesses are. Because not many people know enough alternatives to have a clue even about the language they do know.

Let's just say that I think Delphi is entierly too low level as well (you're building a bot by golly). C# would be a better choice in a number of ways (if what you actually cared about was the number of features and the quality of the app), but it wouldn't be my #1 choice either, for several reasons.

Oh well. Sigh.


Joined: Jan 2004
Posts: 79
C
cmad Offline OP
Babel fish
OP Offline
Babel fish
C
Joined: Jan 2004
Posts: 79
Quote:
But I'd like to see more awareness of what C++ really is, what it's strengths are, and what it's weaknesses are.


Then go get a C++ book.

Quote:
Because not many people know enough alternatives to have a clue even about the language they do know.


The one thing has absolutely nothing to do with the other. Maybe if you changed the expression a bit, it would make sense. Like "Because not many people know enough alternatives to have a clue about the superiority of those alternatives over their language in a certain section."

Quote:
Let's just say that I think Delphi is entierly too low level as well.


As a matter of fact it would be as low level as C++. Umm, maybe a bit less. There are those nice TCPClient or IdTCPClient components that make socket handling, really easier.

Quote:
C# would be a better choice in a number of ways


Okay now come the "religious" stuff:

1) I would NEVER use a M$ product. Only reason I boot Windows once in a while is because I haven't yet copied all my stuff in my Linux partition. So one reason I why I won't use C# is this.

2) I don't like rip-off languages. C# is a dumb C++ and Java rip-off that M$ made just to get more stuff in their rip-off collection.

3) And last but not least, I'd never use C# in a Linux enviroment. I have never programmed in C# (and I'm not planning to), and would never put such trash in my Linux partition.


EDIT: May I suppose you use Windows?

Last edited by cmad; 27/03/04 06:48 AM.

My ally is the compiler, and a powerful ally it is!
Joined: Dec 2002
Posts: 2,985
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2002
Posts: 2,985
http://www.pbs.org/cringely/pulpit/pulpit20011101.html

Quite an interesting article and one that does represent the sway of all anti-M$ sentiment. It's like getting two wrestlers side by side, one is an obese 200kg goliath and the other a 100kg trim, muscular bloke and then saying "Look at the big fella, the huge gut, panting for breath, the smaller fella is fitter and will take him down" yet the bigger wrestler just uses weight and reach advantage and knocks the smaller opponent out.

One is clearly the winner. Does it matter how they won? Not really. Can Microsoft remain the 'winner' in the market place forever? In line with what is mentioned on the site I quoted here, it all comes down to whether YOU are going to sit in your corner and muckrake the big bloke or come out of the corner and defeat him with a better product.

If you think there is a problem then be a part of the solution instead of crying about it.

Joined: Jan 2004
Posts: 79
C
cmad Offline OP
Babel fish
OP Offline
Babel fish
C
Joined: Jan 2004
Posts: 79
I got one thing to say about the one who wrote that article: wintroll.

M$ is really big and popular, NO-ONE can deny this. Do you think it's so easy to beat a company like that? A company whose influence in everything is above average? Do you think that people will just migrate from Windows to some other decent OS just like that? No they won't. Nothing of that will happen anytime soon; none of the above will happen quickly. You can't just beat M$ in one day with one product. Many people believe in M$, are M$ addicts; they don't know that there are people NOT using M$ products. That's because of M$'s influence and ads.

No Java can't just beat M$ by itself. People can't just migrate from one language to the other, from one OS to the other. It's not Sun's fault. But it's also not M$'s fault. It the public's fault. They fail to seek alternatives. They think that windows is the sole OS out there. Some of them don't KNOW what an OS is. People like them can't migrate and never will. They can stay to M$.

And about C#. The article writer is exagerating; way more than normal. C# isn't so popular. I'd advise you guys (and the article writer) to go on some newsgroups and see C# criticisms. It's not just me saying it... I believe the article writer only goes to windows newsgroups (if he goes anyway). Of COURSE he'll see a big part of the people using that newsgroup being C# fans. But no... Even though people programming for windows are indeed more than the people programming for other OSs, the number of people programming in C# is small. It's the stats saying it. Yeah you might say "C# is new" and stuff, but that's a silly argument. If something is *GOOD* it becomes popular, not dominant though, within the month it's released. M$ was the company to first release a GUI. That's why it's so popular. But was it the first company to think of making a GUI for their OS? No... M$ stole the idea from Apple, which delayed the release date of their OS which resulted in Windows becoming the dominant OS. Apple itself stole the idea from Xerox. So does the fact that Windows was the first published OS with a GUI, mean that Windows is the best one? No. M$ hurried to release Windows which resulted in bugs and errors in their OS. But they got what they wanted.

Now M$ has achieved a monopoly in the PC market, which IS hard to break.

Quote:
One is clearly the winner. Does it matter how they won? Not really. Can Microsoft remain the 'winner' in the market place forever? In line with what is mentioned on the site I quoted here, it all comes down to whether YOU are going to sit in your corner and muckrake the big bloke or come out of the corner and defeat him with a better product.


Despite you, it's also up to the public. No M$ will not remain the winner forever. Everything has a beginning, but everything has an end as well. That end, however, is quite some time from now. People change, habits change, likes and dislikes change. None of that changes fast enough though.

Quote:
If you think there is a problem then be a part of the solution instead of crying about it.


This is indeed one of the best quotes ever. No sarcasm is meant. And be sure that no-one just sits and cries about M$ being the ruler. They all do what they can. And as I said some times above, things will change; not soon though.

PS. I could say a lot more things but I could not remember all of them while writing my other thoughts. I think I have stated my opinion.

!!! NOW !!!

This talk is absolutely off topic in this thread, so let's stop it. There's no point arguing about this kinda stuff in an IRC discussion forum. I have made my mind, my project will be written on C++. If someone wishes to write it in a different language then do so. I have no objection. I wish you the best of luck if you decide to do so.

Take care everyone,
- cmad


My ally is the compiler, and a powerful ally it is!
Joined: Jun 2003
Posts: 384
D
Fjord artisan
Offline
Fjord artisan
D
Joined: Jun 2003
Posts: 384
Well said, m8 smile

Joined: Dec 2002
Posts: 2,985
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2002
Posts: 2,985
Everything has a beginning, but everything has an end as well.

Quite right, exactly the point, well have the point I am trying to get across. But lets face it, Micro$oft has been more of a victim of court cases than valid competition. I'm not saying Micro$oft would be easy to beat, I'm just saying that it would be easier if the 'competition' made a competitive product.

Every man and his dog knows that no operating system is perfect, all have good points and bad points. Hell, I still use DOS for things and when was that made? People like you and me can install things like Linux with little or no problems but Joe Average obviously cant which is why he prefers to pay for an OS that really installs itself. Market power doesn't just materialise from thin air, it comes from taking something (ripping if you like) and turning it into a product that people who otherwise have no computer knowledge can assimilate to.

When a Unix based product can:

Arrive on a boxed CD,
Come with free support from the vendor,
More or less install itself without asking the end user to find things like video card model numbers,
Automatically detect internet connections and install drivers for them,
Etc etc etc....

Then the masses will go for it and leave Micro$oft wanting.

At this time Linux and FreeBSD offerings simply cannot provide this and the only Non-Windows OS that can is OSX. It's main disadvantage though is the cost of hardware.

When you look at it from a business perspective all Micro$oft is doing is protecting an investment worth billions. If I was running the company I know I'd do all I could to achieve that end too. Large companies also play an important role in society by employing thousands of people and donating to charities and medical research.

Here in Australia our national phone carrier, Telstra, is probably on an equal footing with Micro$oft in some respects. Telstra is BIG, dominant and universally bagged by alot of people. Yet when they see someone injured and dial the 000 emergency number they are taking advantage of a service offered and supported by that company, at times without even bothering to think about it. Or if you look at General Motors and Ford, between the two they make half of the world's cars under various brands but they cop it too from the muckrakers.

People need to wake up to themselves. Lead the way and offer something better before bagging what they obviously cannot improve on.

Joined: Jun 2003
Posts: 384
D
Fjord artisan
Offline
Fjord artisan
D
Joined: Jun 2003
Posts: 384
I don't really wanna get drawn into this but...

Quote:
When a Unix based product can:

Arrive on a boxed CD,
Come with free support from the vendor,
More or less install itself without asking the end user to find things like video card model numbers,
Automatically detect internet connections and install drivers for them,
Etc etc etc....

Then the masses will go for it and leave Micro$oft wanting.


Mandrake Linux, SUSE Linux and Fedora (except for the boxed CD) fit those bills and they really are at least as easy to install as Windows. The only trouble I can forsee would be with harddisk partitioning, but the installers for the three distros mentioned above have self-partitioning capabilities so it's not a particularly huge obstical.

That's all I wanted to say. Carry on smile

Page 1 of 2 1 2

Link Copied to Clipboard