User Name
Password

Go Back   Planetarion Forums > Planetarion Related Forums > Planetarion Discussions

Reply
Thread Tools Display Modes
Unread 10 Jun 2006, 12:56   #1
Banned
Banned
 
Banned's Avatar
 
Join Date: Jul 2003
Location: ******
Posts: 2,326
Banned contributes so much and asks for so littleBanned contributes so much and asks for so littleBanned contributes so much and asks for so littleBanned contributes so much and asks for so littleBanned contributes so much and asks for so littleBanned contributes so much and asks for so littleBanned contributes so much and asks for so littleBanned contributes so much and asks for so littleBanned contributes so much and asks for so littleBanned contributes so much and asks for so littleBanned contributes so much and asks for so little
An IRC bot!

Munin is the IRC bot I made for Ascendancy. It's ace. I started it because Ascendancy needed a little tech and I wanted to learn some python and pgsql. Rob and I decided that we'd do everything on IRC. Forums and webpages are nice and all, but we didn't feel like coding webpages and forums would detract from the IRC activity.

Every feature in Munin is designed with the goal of minimizing bureaucracy while empowering members to take as large a role in running the alliance as they'd like. Not all features successfully do this, but generally it's worked out nicely.

There's loads more I'd like to do, but I only have so much time. You can see some of what I want to do in the todo.txt. It'd be really cool if you could make some new commands and send them to me.

Features:
  • Access levels allow customizible levels of openness, both on the alliance level and specific for channels and users.
  • Generic commands such as !xp, !stop, !eff, !roidcost.
  • Customizable prefixes, with alternate reply types (PM, notice and public).
  • A unique booking mechanism, that allows casual or coordinated cooperation.
  • Epenis measurement.
  • A scan storing system that inputs the contents of any scan URL seen for later lookup.
  • A customizable invitation system for membership, where current members can sponsor new ones, which they can then invite after a set period of time (when they've discussed the new member with the current ones).
  • Simple target searching by intel.
  • And more.

There are a few rough edges here and there from when I've cut corners. Also keep in mind that since this was a learning project there's not a whole lot of consistency (for example, the newer commands are often implemented using plpgqsl, since I wrote them over easter to learn some PL/SQL).

In addition to the IRC bot, there is Hugin, the botfile dumper. I've been meaning to expand Hugin greatly (to try to do some intel analysis, maybe add some stuff from Sandmans like total ticks roided etc), but I never got around to it. The pl/pgsql version is still dog slow. The problem is in the rank adding functions, if anyone cares enough to have a look.

I owe thanks to several people who have (both knowingly and not) helped me. Thanks to XtoTheZ, whose Bowser I stole many basic functions from. Thanks to idimmu, who contributed much of the scan parsing code. Thanks to Raging-Retard and Jeekay, who helped me out with SQL and PL/SQL whenever I asked. Thanks to Heartless for many long discussions about subset sum and other cunning ways to massage intel (sadly, we never got around to coding any of them into Munin/Hugin) and more SQL help. Thanks to Rob for sanity checking new features and help on design choices. And finally thanks to all the Ascendancy members who have used Munin (and gone on and on about how amazing it is ).

The README file:

Code:
Requirements:

python 2.3 (it may run with earlier versions, but this is untested)
postgresql 8.1 (it may run with 8.0, but I'm pretty sure it won't run
on 7.x)
plpgsql
a database (I haven't done any namespace stuff, but if you play around
with table names you could probably run it on a common DB.)
crontab
1GB drivespace for a full round. Usable with less if you remove old
tick information, but this might cause some breakage (for example with
old scans)

Install instructions:

0) Install pgsql, python, etc.
a) CREATE DATABASE yourdbnamehere WITH ENCODING = 'LATIN1';
b) find every reference to the old user and dbname in the code (there
shouldn't be many) and change them to yourdbname. (Hint: hugin.py, parser.py)
c) Add the plpgsql language to your database. This usually requires
superuser access. It can either be done from the commandline with:

createlang plpgsql yourdbnamehere

Or in SQL with:

CREATE LANGUAGE plpgqsl

d) Fix user_table.sql to insert the correct superuser pnick (it's
currently set to jester).
e) \i user_table.sql and \i functions.sql
f) optional: insert stats (see below)
g) make sure the mods in the mod dir are the only ones you're
interested in using.
h) change all the ascendancy specific code to be less ascendancy
specific (check for channel specific stuff mod dir).
i) Change the nick variable in munin.py.
j) you should be set (though I've probably forgotten a bunch of
stuff).


Instructions for inserting stats (also found in howto_makestats.txt):

a) copy stats from html to excel
b) remove efficiency columns, add total cost column
c) make temp table = ship table without id column
d) \copy temptablename from stdin
e) copy ships from excel to stdin
f) insert into ship 
(name,class,target,type,init,armor,damage,metal,crystal,eonium,race,total_cost) 
select * from foo ;

The temp table is used because I want IDs for the ships.
If you try to set up Munin, expect to get your hands dirty. If you have trouble, you might be able to find me on IRC (as jesterina) though you'll probably get a reply faster by sending me a board PM.

The source can be found here. It's released under the GPL license. Enjoy

Edit: I mangled the source a bit when I added the license blocks, I've uploaded a fixed version.

Last edited by Banned; 11 Jun 2006 at 12:43.
Banned is offline   Reply With Quote
Unread 10 Jun 2006, 16:56   #2
jupp
Hi there ...
 
jupp's Avatar
 
Join Date: May 2004
Posts: 481
jupp has a brilliant futurejupp has a brilliant futurejupp has a brilliant futurejupp has a brilliant futurejupp has a brilliant futurejupp has a brilliant futurejupp has a brilliant futurejupp has a brilliant futurejupp has a brilliant futurejupp has a brilliant futurejupp has a brilliant future
Re: An IRC bot!

i can only say that Munin is one of the best bots i've seen in PA so far. very userfriendly once you know the commands and it is really helping your way throught your PA-day.

nice work jester and thanks again for the fun round we had in Ascendancy together


:crymeariver:
__________________
#Reunion

[Ascendancy] - While you were trying, we were sleeping

jupp is offline   Reply With Quote
Unread 10 Jun 2006, 17:27   #3
JonnyBGood
Banned
 
JonnyBGood's Avatar
 
Join Date: May 2001
Location: Further to the right
Posts: 19,441
JonnyBGood has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.JonnyBGood has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.JonnyBGood has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.JonnyBGood has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.JonnyBGood has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.JonnyBGood has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.JonnyBGood has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.JonnyBGood has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.JonnyBGood has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.JonnyBGood has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.JonnyBGood has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.
Re: An IRC bot!

Munin is really fantastic. For r16 where we sometimes had 40 members booking 3 targets each per night it was awesome in terms of co-ordination and target searching. Of course at the start of each round it takes me like half a day to register my planet.
__________________
Some might ask what good is life without purpose but I'm anticipating a good lunch.
JonnyBGood is offline   Reply With Quote
Unread 10 Jun 2006, 17:59   #4
Nadar
I see you!
 
Nadar's Avatar
 
Join Date: Sep 2002
Location: In any girl
Posts: 2,825
Nadar needs a job and a girlfriendNadar needs a job and a girlfriendNadar needs a job and a girlfriendNadar needs a job and a girlfriendNadar needs a job and a girlfriendNadar needs a job and a girlfriendNadar needs a job and a girlfriendNadar needs a job and a girlfriendNadar needs a job and a girlfriendNadar needs a job and a girlfriendNadar needs a job and a girlfriend
Re: An IRC bot!

Like the other two said, Munin is something extraordinary. It got some nice functions and it's still very user-friendly

Good work jester, I'm sure you've done a lot of alliances (especially the smaller ones) a great favour by releasing the source!
__________________
www.foxystoat.com
Nadar is offline   Reply With Quote
Unread 10 Jun 2006, 18:05   #5
DunkelGraf
Drunken Boozer
 
DunkelGraf's Avatar
 
Join Date: Apr 2003
Posts: 298
DunkelGraf is a splendid one to beholdDunkelGraf is a splendid one to beholdDunkelGraf is a splendid one to beholdDunkelGraf is a splendid one to beholdDunkelGraf is a splendid one to beholdDunkelGraf is a splendid one to beholdDunkelGraf is a splendid one to beholdDunkelGraf is a splendid one to behold
Re: An IRC bot!

Munin is still not able to deliver beer.....
__________________
Geilheit ist KEINE Schande !!!!

! [ToT]-KC !

Äscendäncy, we got Penis inside!
DunkelGraf is offline   Reply With Quote
Unread 10 Jun 2006, 22:44   #6
Heartless
CRASHING BEATS 'N FANTASY
 
Heartless's Avatar
 
Join Date: Mar 2001
Location: Cold Country.
Posts: 1,912
Heartless is an inspiration to us all and we should try to be more like himHeartless is an inspiration to us all and we should try to be more like himHeartless is an inspiration to us all and we should try to be more like himHeartless is an inspiration to us all and we should try to be more like himHeartless is an inspiration to us all and we should try to be more like himHeartless is an inspiration to us all and we should try to be more like himHeartless is an inspiration to us all and we should try to be more like himHeartless is an inspiration to us all and we should try to be more like himHeartless is an inspiration to us all and we should try to be more like himHeartless is an inspiration to us all and we should try to be more like himHeartless is an inspiration to us all and we should try to be more like him
Re: An IRC bot!

the !epenis is clearly the best command. thank you very much for supplying us with such a great bot!
__________________
Ià! Ià! Munin F'tagn! - [*scendancy]
Heartless is offline   Reply With Quote
Unread 11 Jun 2006, 09:29   #7
Banned
Banned
 
Banned's Avatar
 
Join Date: Jul 2003
Location: ******
Posts: 2,326
Banned contributes so much and asks for so littleBanned contributes so much and asks for so littleBanned contributes so much and asks for so littleBanned contributes so much and asks for so littleBanned contributes so much and asks for so littleBanned contributes so much and asks for so littleBanned contributes so much and asks for so littleBanned contributes so much and asks for so littleBanned contributes so much and asks for so littleBanned contributes so much and asks for so littleBanned contributes so much and asks for so little
Re: An IRC bot!

Quote:
Originally Posted by Nadar
Good work jester, I'm sure you've done a lot of alliances (especially the smaller ones) a great favour by releasing the source!
I strongly doubt that, tbh. I'd be surprised if any other alliance ever runs Munin. The real help would be if PAteam provided a bot like Munin as a service to alliances. One that is continually developed, and that alliance techies can contribute to, so that it doesn't fall behind what alliances make for themselves.
Banned is offline   Reply With Quote
Unread 11 Jun 2006, 11:01   #8
Nadar
I see you!
 
Nadar's Avatar
 
Join Date: Sep 2002
Location: In any girl
Posts: 2,825
Nadar needs a job and a girlfriendNadar needs a job and a girlfriendNadar needs a job and a girlfriendNadar needs a job and a girlfriendNadar needs a job and a girlfriendNadar needs a job and a girlfriendNadar needs a job and a girlfriendNadar needs a job and a girlfriendNadar needs a job and a girlfriendNadar needs a job and a girlfriendNadar needs a job and a girlfriend
Re: An IRC bot!

Quote:
Originally Posted by Banned
I strongly doubt that, tbh. I'd be surprised if any other alliance ever runs Munin.
Why not? It's a nice "helper".

But I suppose they'd earn more on it by having it updated by the community instead yeah, especially if they don't have the tech-skills themselves.
__________________
www.foxystoat.com
Nadar is offline   Reply With Quote
Unread 11 Jun 2006, 11:18   #9
Banned
Banned
 
Banned's Avatar
 
Join Date: Jul 2003
Location: ******
Posts: 2,326
Banned contributes so much and asks for so littleBanned contributes so much and asks for so littleBanned contributes so much and asks for so littleBanned contributes so much and asks for so littleBanned contributes so much and asks for so littleBanned contributes so much and asks for so littleBanned contributes so much and asks for so littleBanned contributes so much and asks for so littleBanned contributes so much and asks for so littleBanned contributes so much and asks for so littleBanned contributes so much and asks for so little
Re: An IRC bot!

Quote:
Originally Posted by Nadar
Why not? It's a nice "helper".
Sure, it's nice, but it's got a non-trivial level of entry to get it to run. A lot of PA techies think they can duplicate the work in less time than it will take them to get enough into the Munin code. I think they're wrong, but that's just me.
Banned is offline   Reply With Quote
Unread 11 Jun 2006, 11:29   #10
Nadar
I see you!
 
Nadar's Avatar
 
Join Date: Sep 2002
Location: In any girl
Posts: 2,825
Nadar needs a job and a girlfriendNadar needs a job and a girlfriendNadar needs a job and a girlfriendNadar needs a job and a girlfriendNadar needs a job and a girlfriendNadar needs a job and a girlfriendNadar needs a job and a girlfriendNadar needs a job and a girlfriendNadar needs a job and a girlfriendNadar needs a job and a girlfriendNadar needs a job and a girlfriend
Re: An IRC bot!

I got no idea about tech. Ask me how to connect the bot to irc and you'll see a huge questionmark
__________________
www.foxystoat.com
Nadar is offline   Reply With Quote
Unread 11 Jun 2006, 16:49   #11
Cannon_Fodder
Registered User
 
Cannon_Fodder's Avatar
 
Join Date: Jan 2005
Posts: 3,174
Cannon_Fodder spreads love and joy to the forum in the same way Jesus wouldCannon_Fodder spreads love and joy to the forum in the same way Jesus wouldCannon_Fodder spreads love and joy to the forum in the same way Jesus wouldCannon_Fodder spreads love and joy to the forum in the same way Jesus wouldCannon_Fodder spreads love and joy to the forum in the same way Jesus wouldCannon_Fodder spreads love and joy to the forum in the same way Jesus wouldCannon_Fodder spreads love and joy to the forum in the same way Jesus wouldCannon_Fodder spreads love and joy to the forum in the same way Jesus wouldCannon_Fodder spreads love and joy to the forum in the same way Jesus wouldCannon_Fodder spreads love and joy to the forum in the same way Jesus wouldCannon_Fodder spreads love and joy to the forum in the same way Jesus would
Re: An IRC bot!

The most important question: Will more slogans be added? (Along with a better search thingy for slogans)


P.s. Ace bot.
__________________
If one person is in delusion, they're called insane.
If many people are in delusion, it's called a religion.
Cannon_Fodder is offline   Reply With Quote
Unread 11 Jun 2006, 17:57   #12
Heartless
CRASHING BEATS 'N FANTASY
 
Heartless's Avatar
 
Join Date: Mar 2001
Location: Cold Country.
Posts: 1,912
Heartless is an inspiration to us all and we should try to be more like himHeartless is an inspiration to us all and we should try to be more like himHeartless is an inspiration to us all and we should try to be more like himHeartless is an inspiration to us all and we should try to be more like himHeartless is an inspiration to us all and we should try to be more like himHeartless is an inspiration to us all and we should try to be more like himHeartless is an inspiration to us all and we should try to be more like himHeartless is an inspiration to us all and we should try to be more like himHeartless is an inspiration to us all and we should try to be more like himHeartless is an inspiration to us all and we should try to be more like himHeartless is an inspiration to us all and we should try to be more like him
Re: An IRC bot!

Quote:
Originally Posted by Cannon_Fodder
The most important question: Will more slogans be added? (Along with a better search thingy for slogans)


P.s. Ace bot.
Just add them yourself, lazy bastard ;P
__________________
Ià! Ià! Munin F'tagn! - [*scendancy]
Heartless is offline   Reply With Quote
Unread 11 Jun 2006, 18:10   #13
Cannon_Fodder
Registered User
 
Cannon_Fodder's Avatar
 
Join Date: Jan 2005
Posts: 3,174
Cannon_Fodder spreads love and joy to the forum in the same way Jesus wouldCannon_Fodder spreads love and joy to the forum in the same way Jesus wouldCannon_Fodder spreads love and joy to the forum in the same way Jesus wouldCannon_Fodder spreads love and joy to the forum in the same way Jesus wouldCannon_Fodder spreads love and joy to the forum in the same way Jesus wouldCannon_Fodder spreads love and joy to the forum in the same way Jesus wouldCannon_Fodder spreads love and joy to the forum in the same way Jesus wouldCannon_Fodder spreads love and joy to the forum in the same way Jesus wouldCannon_Fodder spreads love and joy to the forum in the same way Jesus wouldCannon_Fodder spreads love and joy to the forum in the same way Jesus wouldCannon_Fodder spreads love and joy to the forum in the same way Jesus would
Re: An IRC bot!

Like I know how.
__________________
If one person is in delusion, they're called insane.
If many people are in delusion, it's called a religion.
Cannon_Fodder is offline   Reply With Quote
Unread 11 Jun 2006, 19:02   #14
jerome
.
 
jerome's Avatar
 
Join Date: Mar 2004
Posts: 3,382
jerome contributes so much and asks for so littlejerome contributes so much and asks for so littlejerome contributes so much and asks for so littlejerome contributes so much and asks for so littlejerome contributes so much and asks for so littlejerome contributes so much and asks for so littlejerome contributes so much and asks for so littlejerome contributes so much and asks for so littlejerome contributes so much and asks for so littlejerome contributes so much and asks for so littlejerome contributes so much and asks for so little
Re: An IRC bot!

!addslogan slogan
(i think)

The best part of Munin is the integrated login system using VNC where it will not only take your planetarion account to top10 but will also make you better at life!
jerome is offline   Reply With Quote
Unread 11 Jun 2006, 21:45   #15
Banned
Banned
 
Banned's Avatar
 
Join Date: Jul 2003
Location: ******
Posts: 2,326
Banned contributes so much and asks for so littleBanned contributes so much and asks for so littleBanned contributes so much and asks for so littleBanned contributes so much and asks for so littleBanned contributes so much and asks for so littleBanned contributes so much and asks for so littleBanned contributes so much and asks for so littleBanned contributes so much and asks for so littleBanned contributes so much and asks for so littleBanned contributes so much and asks for so littleBanned contributes so much and asks for so little
Re: An IRC bot!

Quote:
Originally Posted by Heartless
Just add them yourself, lazy bastard ;P
Unfortunately he has to have member level access for that, so can't
Banned is offline   Reply With Quote
Unread 11 Jun 2006, 22:21   #16
lokken
BlueTuba
 
lokken's Avatar
 
Join Date: Aug 2000
Posts: 6,339
lokken has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.lokken has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.lokken has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.lokken has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.lokken has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.lokken has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.lokken has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.lokken has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.lokken has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.lokken has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.lokken has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.
Re: An IRC bot!

!addslogan It is better to have loved Munin and lost, than to have never loved Munin at all





__________________
"Build a man a fire, and he'll be warm for a day. Set a man on fire, and he'll be warm for the rest of his life."
lokken is offline   Reply With Quote
Unread 11 Jun 2006, 22:29   #17
idiotwind
Registered User
 
Join Date: May 2005
Posts: 41
idiotwind is just really niceidiotwind is just really niceidiotwind is just really niceidiotwind is just really niceidiotwind is just really nice
Re: An IRC bot!

I have a wooden sculpture of Munin outside my school.

So there.
__________________
Semantics will tear us apart.
idiotwind is offline   Reply With Quote
Unread 12 Jun 2006, 10:07   #18
Stoom
Bragpack™
 
Stoom's Avatar
 
Join Date: Nov 2004
Posts: 815
Stoom has a reputation beyond reputeStoom has a reputation beyond reputeStoom has a reputation beyond reputeStoom has a reputation beyond reputeStoom has a reputation beyond reputeStoom has a reputation beyond reputeStoom has a reputation beyond reputeStoom has a reputation beyond reputeStoom has a reputation beyond reputeStoom has a reputation beyond reputeStoom has a reputation beyond repute
Re: An IRC bot!

Quote:
Originally Posted by jupp
i can only say that Munin is one of the best bots i've seen in PA so far. very userfriendly once you know the commands and it is really helping your way throught your PA-day.

nice work jester and thanks again for the fun round we had in Ascendancy together


:crymeariver:
what the german said^^
Stoom is offline   Reply With Quote
Unread 15 Jun 2006, 17:46   #19
NitinA
Laziness pays off NOW!
 
NitinA's Avatar
 
Join Date: Oct 2004
Location: Pensacola, FL, USA
Posts: 596
NitinA has a brilliant futureNitinA has a brilliant futureNitinA has a brilliant futureNitinA has a brilliant futureNitinA has a brilliant futureNitinA has a brilliant futureNitinA has a brilliant futureNitinA has a brilliant futureNitinA has a brilliant futureNitinA has a brilliant futureNitinA has a brilliant future
Re: An IRC bot!

All Hail Munin I remember Good Ol' Munin from Ascendancy...

<3
__________________
Proud to have been :
[ReBorn] High Council - Wing Leader
[Knights] High Council - Founder
[Silver] High Council - Military
[WolfPack] High Council - Military
[Ascendancy] Member
[eXilition] High Council - Defence
7-Round Official Planetarion #Support Team Member
Retired Since Round 21
NitinA is offline   Reply With Quote
Unread 17 Jun 2006, 01:07   #20
Teddy_Bear
The Original Teddy
 
Teddy_Bear's Avatar
 
Join Date: Mar 2003
Location: A roid Far Far away
Posts: 56
Teddy_Bear will become famous soon enoughTeddy_Bear will become famous soon enough
Re: An IRC bot!

a totaly great bot all i have to say
__________________
Round 1 Veteran - Played 30 Rounds - Been in a lot of Allies
Now a member of Ascendancy
Teddy_Bear is offline   Reply With Quote
Reply


Thread Tools
Display Modes

Forum Jump


All times are GMT +1. The time now is 12:04.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2002 - 2018