Nieuws:

Welkom, Gast. Alsjeblieft inloggen of registreren.
Heb je de activerings-mail niet ontvangen?

Auteur Topic: Lucky IRC Bot  (gelezen 2200 keer)

Offline Sh4wn

  • Lid
    • http://www.return1.net
  • Steunpunt: Nee
Lucky IRC Bot
« Gepost op: 2009/02/11, 22:21:40 »
Ik ben al sinds mijn vroege programmeer jaren bezig met IRC Botjes, en dit is mijn laatste creatie. :P Was mijn allereerste IRC Bot (zo'n 3 a 4 jaar geleden) 1 enkele class met allemaal functies er in gepropt, en 1 grote functie die alle commands checkte, is het tegenwoordig een mooi programma met GUI en plugins. :)

We zijn aangekomen bij mijn 4e IRC Bot, en die is geschreven in mijn favoriete programmeertaal, Python! Deze bot heeft momenteel de volgende features:

  • GUI en Console Mode
  • Multiserver, hij kan dus op meerdere servers tegelijk
  • Multichannel
  • Mooi plugin systeem
  • Plugins zijn makkelijk te maken
  • Authenticatie systeem
  • Multilanguage (ligt ook aan de plugin zelf)

Momenteel is de bot nog in alpha fase, maar de basis werkt al tamelijk goed.

Wat werkt er
  • Verbinden met IRC Server(s)
  • Plugin systeem
  • Authenticatie Systeem
  • Console mode
  • GUI voor een deel

Wat werkt er nog niet
Dat zijn vooral de GUI dingetjes:
  • 'Add Server' knop in het hoofdscherm, waarmee je naar een server kan verbinden zonder hem in de instellingen op te slaan
  • Plugins in/uit schakelen
  • Instellingen wijzigen (voorkeuren scherm werkt wel, maar hij slaat nog niks op, en nog niet alles van de voorkeuren is af)

Ook lever ik standaard wat plugins mee:
  • Authenticatie plugin (in en uitloggen op je bot)
  • Plugin managment (Plugins in- of uitschakelen, plugins herladen)
  • Bot informatie (Credits, lijst met ingeschakelde plugins, plugin informatie en commando's)
  • Bot acties (Join/part een kanaal, verander nickname, nog wat andere acties)
  • Last.FM Plugin (Laat huidig liedje zien, of de top tracks/artiesten/weekelijke top tracks)
  • RSS Reader Plugin (Lees een gegeven rss feed uit, sla bepaalde 'feed presets' op, en roep ze makkelijk weer op)
  • TV Gids Plugin (Wat is er nu op TV, wat komt er zometeen, en welke films komen er vandaag?)
  • Radio Plugin (wat draait er nu op de radio, momenteel ondersteunt: 538, Slamfm, 3fm)
  • Systeem informatie plugin (Geeft wat systeem informatie)

Plugins die ik op de planning heb staan:
  • Van dale woordenboek
  • Statistieken plugin
  • Weer plugin
  • Slap plugin
  • Google Define: ripper
  • etc..

Screenshotje kan natuurlijk niet ontbreken:


Ik weet dat hier veel mensen Qt fan zijn, en ik moet zeggen, ik denk dat ik ook ga overstappen, maar momenteel heeft een Qt GUI geen prioriteit :P Al is dat goed mogelijk door gewoon een extra view class te maken :)

Voor dit project ben ik heel wat gratis project hosting sites afgegaan, eerst Google Code, toen launchpad, toen github, maar nu toch weer terug bij Google code, dus vandaar de zeer korte revisie geschiedenis ;)

Google code pagina:
http://luckybot.googlecode.com

Onder downloads vind je de eerste alpha release. Om deze te draaien heb je python-gobject nodig voor console, en python-gtk voor de GUI. Onder 'Source' kan je natuurlijk de code bekijken (als je geen zin hebt om iets te downloaden).

Mocht je zelf een plugin willen maken, heb ik de API documentatie hier online gezet:
http://www.return1.net/docs/luckybot

Je kan plugins kwijt in de plugins/ map van luckybot zelf, of in ~/.luckybot/plugins
Ook raad ik het je aan, om data/settings.ini te kopiëren, en te plakken naar ~/.luckybot/settings.ini en in dat bestand je wijzigingen te doen.

Tell me what you think! :)

« Laatst bewerkt op: 2009/02/11, 23:02:31 door Sh4wn »

Offline Gijsbert

  • Lid
  • Steunpunt: Ja
Re: Lucky IRC Bot
« Reactie #1 Gepost op: 2009/02/11, 22:55:37 »
Ziet er goed uit. Ik vind het altijd knap als mensen met een programmeer taal , een programma schrijven. Ik ben nooit verder gekomen dan bij wijze van spreken  "print hallo" o.i.d.
Komt er nog een deb van, voor de niet terminal tijgers?
Ik ga vast de alfa tar downloaden en installeren.
Succes met het aanpassen en dergelijke.

Met vriendelijke groet,

Gijs
In der Beschränkung zeigt sich der Meister.

Offline Sh4wn

  • Lid
    • http://www.return1.net
  • Steunpunt: Nee
Re: Lucky IRC Bot
« Reactie #2 Gepost op: 2009/02/11, 23:02:10 »
Ziet er goed uit. Ik vind het altijd knap als mensen met een programmeer taal , een programma schrijven. Ik ben nooit verder gekomen dan bij wijze van spreken  "print hallo" o.i.d.
Komt er nog een deb van, voor de niet terminal tijgers?
Ik ga vast de alfa tar downloaden en installeren.
Succes met het aanpassen en dergelijke.

Met vriendelijke groet,

Gijs

Van de alpha versies ga ik geen deb maken :) Als ik aan de beta toekom denk ik wel, en uiteindelijk wil ik ook een windows en Mac OSX versie hebben (wat niet al teveel moeite zou moeten kosten)

:)

Om dit programma te starten hoef je hem alleen maar ergens uit te pakken en dan het 'run' bestand op te starten. je kan ook './run --no-gui' doen voor de console.
« Laatst bewerkt op: 2009/02/11, 23:06:18 door Sh4wn »

Offline Gijsbert

  • Lid
  • Steunpunt: Ja
Re: Lucky IRC Bot
« Reactie #3 Gepost op: 2009/02/11, 23:25:22 »
Opgestart en krijg deze fout te zien Could not load plugin poker.
Hier de complete dump van installatie en starten knoppen uit proberen, misschien doe ik wat fout kan altijd.  :|
gijs@gijs-8:~/Downloads/luckybot-4.0alpha1$ python setup.py build
running build
running build_py
creating build
creating build/lib
creating build/lib/luckybot
copying luckybot/misc.py -> build/lib/luckybot
copying luckybot/decorators.py -> build/lib/luckybot
copying luckybot/path.py -> build/lib/luckybot
copying luckybot/__init__.py -> build/lib/luckybot
creating build/lib/luckybot/bot
copying luckybot/bot/irc.py -> build/lib/luckybot/bot
copying luckybot/bot/main.py -> build/lib/luckybot/bot
copying luckybot/bot/language.py -> build/lib/luckybot/bot
copying luckybot/bot/auth.py -> build/lib/luckybot/bot
copying luckybot/bot/__init__.py -> build/lib/luckybot/bot
copying luckybot/bot/plugins.py -> build/lib/luckybot/bot
creating build/lib/luckybot/luckynet
copying luckybot/luckynet/protocol.py -> build/lib/luckybot/luckynet
copying luckybot/luckynet/__init__.py -> build/lib/luckybot/luckynet
creating build/lib/luckybot/luckynet/connection
copying luckybot/luckynet/connection/__init__.py -> build/lib/luckybot/luckynet/connection
copying luckybot/luckynet/connection/glib.py -> build/lib/luckybot/luckynet/connection
creating build/lib/luckybot/luckynet/protocols
copying luckybot/luckynet/protocols/irc.py -> build/lib/luckybot/luckynet/protocols
copying luckybot/luckynet/protocols/__init__.py -> build/lib/luckybot/luckynet/protocols
copying luckybot/luckynet/protocols/simple.py -> build/lib/luckybot/luckynet/protocols
creating build/lib/luckybot/views
copying luckybot/views/__init__.py -> build/lib/luckybot/views
copying luckybot/views/console.py -> build/lib/luckybot/views
copying luckybot/views/base.py -> build/lib/luckybot/views
creating build/lib/luckybot/views/gui
copying luckybot/views/gui/config.py -> build/lib/luckybot/views/gui
copying luckybot/views/gui/__init__.py -> build/lib/luckybot/views/gui
running build_scripts
creating build/scripts-2.5
copying and adjusting run -> build/scripts-2.5
changing mode of build/scripts-2.5/run from 644 to 755
gijs@gijs-8:~/Downloads/luckybot-4.0alpha1$ python setup.py install
running install
running build
running build_py
running build_scripts
running install_lib
creating /usr/lib/python2.5/site-packages/luckybot
error: could not create '/usr/lib/python2.5/site-packages/luckybot': Permission denied
gijs@gijs-8:~/Downloads/luckybot-4.0alpha1$ sudo python setup.py install
running install
running build
running build_py
running build_scripts
running install_lib
creating /usr/lib/python2.5/site-packages/luckybot
copying build/lib/luckybot/misc.py -> /usr/lib/python2.5/site-packages/luckybot
copying build/lib/luckybot/decorators.py -> /usr/lib/python2.5/site-packages/luckybot
copying build/lib/luckybot/path.py -> /usr/lib/python2.5/site-packages/luckybot
copying build/lib/luckybot/__init__.py -> /usr/lib/python2.5/site-packages/luckybot
creating /usr/lib/python2.5/site-packages/luckybot/luckynet
creating /usr/lib/python2.5/site-packages/luckybot/luckynet/protocols
copying build/lib/luckybot/luckynet/protocols/irc.py -> /usr/lib/python2.5/site-packages/luckybot/luckynet/protocols
copying build/lib/luckybot/luckynet/protocols/__init__.py -> /usr/lib/python2.5/site-packages/luckybot/luckynet/protocols
copying build/lib/luckybot/luckynet/protocols/simple.py -> /usr/lib/python2.5/site-packages/luckybot/luckynet/protocols
copying build/lib/luckybot/luckynet/protocol.py -> /usr/lib/python2.5/site-packages/luckybot/luckynet
copying build/lib/luckybot/luckynet/__init__.py -> /usr/lib/python2.5/site-packages/luckybot/luckynet
creating /usr/lib/python2.5/site-packages/luckybot/luckynet/connection
copying build/lib/luckybot/luckynet/connection/__init__.py -> /usr/lib/python2.5/site-packages/luckybot/luckynet/connection
copying build/lib/luckybot/luckynet/connection/glib.py -> /usr/lib/python2.5/site-packages/luckybot/luckynet/connection
creating /usr/lib/python2.5/site-packages/luckybot/views
creating /usr/lib/python2.5/site-packages/luckybot/views/gui
copying build/lib/luckybot/views/gui/config.py -> /usr/lib/python2.5/site-packages/luckybot/views/gui
copying build/lib/luckybot/views/gui/__init__.py -> /usr/lib/python2.5/site-packages/luckybot/views/gui
copying build/lib/luckybot/views/__init__.py -> /usr/lib/python2.5/site-packages/luckybot/views
copying build/lib/luckybot/views/console.py -> /usr/lib/python2.5/site-packages/luckybot/views
copying build/lib/luckybot/views/base.py -> /usr/lib/python2.5/site-packages/luckybot/views
creating /usr/lib/python2.5/site-packages/luckybot/bot
copying build/lib/luckybot/bot/irc.py -> /usr/lib/python2.5/site-packages/luckybot/bot
copying build/lib/luckybot/bot/main.py -> /usr/lib/python2.5/site-packages/luckybot/bot
copying build/lib/luckybot/bot/language.py -> /usr/lib/python2.5/site-packages/luckybot/bot
copying build/lib/luckybot/bot/auth.py -> /usr/lib/python2.5/site-packages/luckybot/bot
copying build/lib/luckybot/bot/__init__.py -> /usr/lib/python2.5/site-packages/luckybot/bot
copying build/lib/luckybot/bot/plugins.py -> /usr/lib/python2.5/site-packages/luckybot/bot
byte-compiling /usr/lib/python2.5/site-packages/luckybot/misc.py to misc.pyc
byte-compiling /usr/lib/python2.5/site-packages/luckybot/decorators.py to decorators.pyc
byte-compiling /usr/lib/python2.5/site-packages/luckybot/path.py to path.pyc
byte-compiling /usr/lib/python2.5/site-packages/luckybot/__init__.py to __init__.pyc
byte-compiling /usr/lib/python2.5/site-packages/luckybot/luckynet/protocols/irc.py to irc.pyc
byte-compiling /usr/lib/python2.5/site-packages/luckybot/luckynet/protocols/__init__.py to __init__.pyc
byte-compiling /usr/lib/python2.5/site-packages/luckybot/luckynet/protocols/simple.py to simple.pyc
byte-compiling /usr/lib/python2.5/site-packages/luckybot/luckynet/protocol.py to protocol.pyc
byte-compiling /usr/lib/python2.5/site-packages/luckybot/luckynet/__init__.py to __init__.pyc
byte-compiling /usr/lib/python2.5/site-packages/luckybot/luckynet/connection/__init__.py to __init__.pyc
byte-compiling /usr/lib/python2.5/site-packages/luckybot/luckynet/connection/glib.py to glib.pyc
byte-compiling /usr/lib/python2.5/site-packages/luckybot/views/gui/config.py to config.pyc
byte-compiling /usr/lib/python2.5/site-packages/luckybot/views/gui/__init__.py to __init__.pyc
byte-compiling /usr/lib/python2.5/site-packages/luckybot/views/__init__.py to __init__.pyc
byte-compiling /usr/lib/python2.5/site-packages/luckybot/views/console.py to console.pyc
byte-compiling /usr/lib/python2.5/site-packages/luckybot/views/base.py to base.pyc
byte-compiling /usr/lib/python2.5/site-packages/luckybot/bot/irc.py to irc.pyc
byte-compiling /usr/lib/python2.5/site-packages/luckybot/bot/main.py to main.pyc
byte-compiling /usr/lib/python2.5/site-packages/luckybot/bot/language.py to language.pyc
byte-compiling /usr/lib/python2.5/site-packages/luckybot/bot/auth.py to auth.pyc
byte-compiling /usr/lib/python2.5/site-packages/luckybot/bot/__init__.py to __init__.pyc
byte-compiling /usr/lib/python2.5/site-packages/luckybot/bot/plugins.py to plugins.pyc
running install_scripts
copying build/scripts-2.5/run -> /usr/bin
changing mode of /usr/bin/run to 755
running install_data
creating /usr/luckybot
copying luckybot/misc.py -> /usr/luckybot/
copying luckybot/__init__.pyc -> /usr/luckybot/
copying luckybot/decorators.py -> /usr/luckybot/
copying luckybot/path.py -> /usr/luckybot/
copying luckybot/__init__.py -> /usr/luckybot/
creating /usr/luckybot/plugins
creating /usr/luckybot/plugins/botactions
copying luckybot/plugins/botactions/__init__.py -> /usr/luckybot/plugins/botactions
creating /usr/luckybot/plugins/auth
copying luckybot/plugins/auth/__init__.py -> /usr/luckybot/plugins/auth
creating /usr/luckybot/plugins/botinfo
copying luckybot/plugins/botinfo/__init__.py -> /usr/luckybot/plugins/botinfo
creating /usr/luckybot/plugins/radio
copying luckybot/plugins/radio/__init__.py -> /usr/luckybot/plugins/radio
creating /usr/luckybot/plugins/rss
copying luckybot/plugins/rss/language.ini -> /usr/luckybot/plugins/rss
copying luckybot/plugins/rss/rss.db -> /usr/luckybot/plugins/rss
copying luckybot/plugins/rss/__init__.py -> /usr/luckybot/plugins/rss
creating /usr/luckybot/plugins/sysinfo
copying luckybot/plugins/sysinfo/.DS_Store -> /usr/luckybot/plugins/sysinfo
copying luckybot/plugins/sysinfo/__init__.py -> /usr/luckybot/plugins/sysinfo
creating /usr/luckybot/plugins/plugin_managment
copying luckybot/plugins/plugin_managment/__init__.py -> /usr/luckybot/plugins/plugin_managment
creating /usr/luckybot/plugins/tvgids
copying luckybot/plugins/tvgids/__init__.py -> /usr/luckybot/plugins/tvgids
creating /usr/luckybot/plugins/poker
copying luckybot/plugins/poker/deck.py -> /usr/luckybot/plugins/poker
creating /usr/luckybot/plugins/lastfm
copying luckybot/plugins/lastfm/__init__.py -> /usr/luckybot/plugins/lastfm
creating /usr/luckybot/luckynet
copying luckybot/luckynet/protocol.py -> /usr/luckybot/luckynet
copying luckybot/luckynet/__init__.py -> /usr/luckybot/luckynet
creating /usr/luckybot/luckynet/protocols
copying luckybot/luckynet/protocols/irc.py -> /usr/luckybot/luckynet/protocols
copying luckybot/luckynet/protocols/__init__.py -> /usr/luckybot/luckynet/protocols
copying luckybot/luckynet/protocols/simple.py -> /usr/luckybot/luckynet/protocols
creating /usr/luckybot/luckynet/connection
copying luckybot/luckynet/connection/__init__.py -> /usr/luckybot/luckynet/connection
copying luckybot/luckynet/connection/glib.py -> /usr/luckybot/luckynet/connection
creating /usr/luckybot/views
copying luckybot/views/__init__.py -> /usr/luckybot/views
copying luckybot/views/console.py -> /usr/luckybot/views
copying luckybot/views/base.py -> /usr/luckybot/views
creating /usr/luckybot/views/gui
copying luckybot/views/gui/config.py -> /usr/luckybot/views/gui
copying luckybot/views/gui/__init__.py -> /usr/luckybot/views/gui
creating /usr/luckybot/bot
copying luckybot/bot/irc.py -> /usr/luckybot/bot
copying luckybot/bot/main.py -> /usr/luckybot/bot
copying luckybot/bot/language.py -> /usr/luckybot/bot
copying luckybot/bot/auth.py -> /usr/luckybot/bot
copying luckybot/bot/__init__.py -> /usr/luckybot/bot
copying luckybot/bot/plugins.py -> /usr/luckybot/bot
creating /usr/luckybot/data
copying luckybot/data/settings.ini -> /usr/luckybot/data
creating /usr/luckybot/data/glade
copying luckybot/data/glade/mainwindow.glade -> /usr/luckybot/data/glade
copying luckybot/data/glade/config.glade -> /usr/luckybot/data/glade
creating /usr/luckybot/data/pixmaps
copying luckybot/data/pixmaps/logo_16.png -> /usr/luckybot/data/pixmaps
copying luckybot/data/pixmaps/logo_192.png -> /usr/luckybot/data/pixmaps
copying luckybot/data/pixmaps/logo_64.png -> /usr/luckybot/data/pixmaps
copying luckybot/data/pixmaps/logo_32.png -> /usr/luckybot/data/pixmaps
copying luckybot/data/pixmaps/logo_14.png -> /usr/luckybot/data/pixmaps
running install_egg_info
Writing /usr/lib/python2.5/site-packages/luckybot-4.0alpha1.egg-info
gijs@gijs-8:~/Downloads/luckybot-4.0alpha1$ python run
Traceback (most recent call last):
  File "/home/gijs/Downloads/luckybot-4.0alpha1/luckybot/bot/plugins.py", line 329, in load_plugin
    module_obj = imp.load_source(name, os.path.join(path,'__init__.py'))
IOError: [Errno 2] Bestand of map bestaat niet
Traceback (most recent call last):
  File "/home/gijs/Downloads/luckybot-4.0alpha1/luckybot/views/gui/__init__.py", line 371, in do_connect
    page.connect_to_server()
  File "/home/gijs/Downloads/luckybot-4.0alpha1/luckybot/views/gui/__init__.py", line 219, in connect_to_server
    self.open_connection(config)
  File "/home/gijs/Downloads/luckybot-4.0alpha1/luckybot/views/gui/__init__.py", line 186, in open_connection
    connection.open((host, port))
  File "/home/gijs/Downloads/luckybot-4.0alpha1/luckybot/luckynet/connection/glib.py", line 51, in open
    super(GlibConnection, self).open(addr)
  File "/home/gijs/Downloads/luckybot-4.0alpha1/luckybot/luckynet/connection/__init__.py", line 159, in open
    super(AsyncConnection, self).open(addr)
  File "/home/gijs/Downloads/luckybot-4.0alpha1/luckybot/luckynet/connection/__init__.py", line 83, in open
    raise socket.error, e
socket.error: (111, 'Verbinding is geweigerd')
Traceback (most recent call last):
  File "/home/gijs/Downloads/luckybot-4.0alpha1/luckybot/views/gui/__init__.py", line 371, in do_connect
    page.connect_to_server()
  File "/home/gijs/Downloads/luckybot-4.0alpha1/luckybot/views/gui/__init__.py", line 219, in connect_to_server
    self.open_connection(config)
  File "/home/gijs/Downloads/luckybot-4.0alpha1/luckybot/views/gui/__init__.py", line 186, in open_connection
    connection.open((host, port))
  File "/home/gijs/Downloads/luckybot-4.0alpha1/luckybot/luckynet/connection/glib.py", line 51, in open
    super(GlibConnection, self).open(addr)
  File "/home/gijs/Downloads/luckybot-4.0alpha1/luckybot/luckynet/connection/__init__.py", line 159, in open
    super(AsyncConnection, self).open(addr)
  File "/home/gijs/Downloads/luckybot-4.0alpha1/luckybot/luckynet/connection/__init__.py", line 83, in open
    raise socket.error, e
socket.error: (111, 'Verbinding is geweigerd')
/home/gijs/Downloads/luckybot-4.0alpha1/luckybot/views/gui/config.py:62: Warning: unable to set property `editable' of type `gboolean' from value of type `gchararray'
  return self.window.run()
Saving..
gijs@gijs-8:~/Downloads/luckybot-4.0alpha1$
Wellicht zie jij wat er niet goed gaat.

Met vriendelijke groet,

Gijs
In der Beschränkung zeigt sich der Meister.

Offline Sh4wn

  • Lid
    • http://www.return1.net
  • Steunpunt: Nee
Re: Lucky IRC Bot
« Reactie #4 Gepost op: 2009/02/11, 23:30:41 »
Opgestart en krijg deze fout te zien Could not load plugin poker.
Hier de complete dump van installatie en starten knoppen uit proberen, misschien doe ik wat fout kan altijd.  :|
gijs@gijs-8:~/Downloads/luckybot-4.0alpha1$ python setup.py build
running build
running build_py
creating build
creating build/lib
creating build/lib/luckybot
copying luckybot/misc.py -> build/lib/luckybot
copying luckybot/decorators.py -> build/lib/luckybot
copying luckybot/path.py -> build/lib/luckybot
copying luckybot/__init__.py -> build/lib/luckybot
creating build/lib/luckybot/bot
copying luckybot/bot/irc.py -> build/lib/luckybot/bot
copying luckybot/bot/main.py -> build/lib/luckybot/bot
copying luckybot/bot/language.py -> build/lib/luckybot/bot
copying luckybot/bot/auth.py -> build/lib/luckybot/bot
copying luckybot/bot/__init__.py -> build/lib/luckybot/bot
copying luckybot/bot/plugins.py -> build/lib/luckybot/bot
creating build/lib/luckybot/luckynet
copying luckybot/luckynet/protocol.py -> build/lib/luckybot/luckynet
copying luckybot/luckynet/__init__.py -> build/lib/luckybot/luckynet
creating build/lib/luckybot/luckynet/connection
copying luckybot/luckynet/connection/__init__.py -> build/lib/luckybot/luckynet/connection
copying luckybot/luckynet/connection/glib.py -> build/lib/luckybot/luckynet/connection
creating build/lib/luckybot/luckynet/protocols
copying luckybot/luckynet/protocols/irc.py -> build/lib/luckybot/luckynet/protocols
copying luckybot/luckynet/protocols/__init__.py -> build/lib/luckybot/luckynet/protocols
copying luckybot/luckynet/protocols/simple.py -> build/lib/luckybot/luckynet/protocols
creating build/lib/luckybot/views
copying luckybot/views/__init__.py -> build/lib/luckybot/views
copying luckybot/views/console.py -> build/lib/luckybot/views
copying luckybot/views/base.py -> build/lib/luckybot/views
creating build/lib/luckybot/views/gui
copying luckybot/views/gui/config.py -> build/lib/luckybot/views/gui
copying luckybot/views/gui/__init__.py -> build/lib/luckybot/views/gui
running build_scripts
creating build/scripts-2.5
copying and adjusting run -> build/scripts-2.5
changing mode of build/scripts-2.5/run from 644 to 755
gijs@gijs-8:~/Downloads/luckybot-4.0alpha1$ python setup.py install
running install
running build
running build_py
running build_scripts
running install_lib
creating /usr/lib/python2.5/site-packages/luckybot
error: could not create '/usr/lib/python2.5/site-packages/luckybot': Permission denied
gijs@gijs-8:~/Downloads/luckybot-4.0alpha1$ sudo python setup.py install
running install
running build
running build_py
running build_scripts
running install_lib
creating /usr/lib/python2.5/site-packages/luckybot
copying build/lib/luckybot/misc.py -> /usr/lib/python2.5/site-packages/luckybot
copying build/lib/luckybot/decorators.py -> /usr/lib/python2.5/site-packages/luckybot
copying build/lib/luckybot/path.py -> /usr/lib/python2.5/site-packages/luckybot
copying build/lib/luckybot/__init__.py -> /usr/lib/python2.5/site-packages/luckybot
creating /usr/lib/python2.5/site-packages/luckybot/luckynet
creating /usr/lib/python2.5/site-packages/luckybot/luckynet/protocols
copying build/lib/luckybot/luckynet/protocols/irc.py -> /usr/lib/python2.5/site-packages/luckybot/luckynet/protocols
copying build/lib/luckybot/luckynet/protocols/__init__.py -> /usr/lib/python2.5/site-packages/luckybot/luckynet/protocols
copying build/lib/luckybot/luckynet/protocols/simple.py -> /usr/lib/python2.5/site-packages/luckybot/luckynet/protocols
copying build/lib/luckybot/luckynet/protocol.py -> /usr/lib/python2.5/site-packages/luckybot/luckynet
copying build/lib/luckybot/luckynet/__init__.py -> /usr/lib/python2.5/site-packages/luckybot/luckynet
creating /usr/lib/python2.5/site-packages/luckybot/luckynet/connection
copying build/lib/luckybot/luckynet/connection/__init__.py -> /usr/lib/python2.5/site-packages/luckybot/luckynet/connection
copying build/lib/luckybot/luckynet/connection/glib.py -> /usr/lib/python2.5/site-packages/luckybot/luckynet/connection
creating /usr/lib/python2.5/site-packages/luckybot/views
creating /usr/lib/python2.5/site-packages/luckybot/views/gui
copying build/lib/luckybot/views/gui/config.py -> /usr/lib/python2.5/site-packages/luckybot/views/gui
copying build/lib/luckybot/views/gui/__init__.py -> /usr/lib/python2.5/site-packages/luckybot/views/gui
copying build/lib/luckybot/views/__init__.py -> /usr/lib/python2.5/site-packages/luckybot/views
copying build/lib/luckybot/views/console.py -> /usr/lib/python2.5/site-packages/luckybot/views
copying build/lib/luckybot/views/base.py -> /usr/lib/python2.5/site-packages/luckybot/views
creating /usr/lib/python2.5/site-packages/luckybot/bot
copying build/lib/luckybot/bot/irc.py -> /usr/lib/python2.5/site-packages/luckybot/bot
copying build/lib/luckybot/bot/main.py -> /usr/lib/python2.5/site-packages/luckybot/bot
copying build/lib/luckybot/bot/language.py -> /usr/lib/python2.5/site-packages/luckybot/bot
copying build/lib/luckybot/bot/auth.py -> /usr/lib/python2.5/site-packages/luckybot/bot
copying build/lib/luckybot/bot/__init__.py -> /usr/lib/python2.5/site-packages/luckybot/bot
copying build/lib/luckybot/bot/plugins.py -> /usr/lib/python2.5/site-packages/luckybot/bot
byte-compiling /usr/lib/python2.5/site-packages/luckybot/misc.py to misc.pyc
byte-compiling /usr/lib/python2.5/site-packages/luckybot/decorators.py to decorators.pyc
byte-compiling /usr/lib/python2.5/site-packages/luckybot/path.py to path.pyc
byte-compiling /usr/lib/python2.5/site-packages/luckybot/__init__.py to __init__.pyc
byte-compiling /usr/lib/python2.5/site-packages/luckybot/luckynet/protocols/irc.py to irc.pyc
byte-compiling /usr/lib/python2.5/site-packages/luckybot/luckynet/protocols/__init__.py to __init__.pyc
byte-compiling /usr/lib/python2.5/site-packages/luckybot/luckynet/protocols/simple.py to simple.pyc
byte-compiling /usr/lib/python2.5/site-packages/luckybot/luckynet/protocol.py to protocol.pyc
byte-compiling /usr/lib/python2.5/site-packages/luckybot/luckynet/__init__.py to __init__.pyc
byte-compiling /usr/lib/python2.5/site-packages/luckybot/luckynet/connection/__init__.py to __init__.pyc
byte-compiling /usr/lib/python2.5/site-packages/luckybot/luckynet/connection/glib.py to glib.pyc
byte-compiling /usr/lib/python2.5/site-packages/luckybot/views/gui/config.py to config.pyc
byte-compiling /usr/lib/python2.5/site-packages/luckybot/views/gui/__init__.py to __init__.pyc
byte-compiling /usr/lib/python2.5/site-packages/luckybot/views/__init__.py to __init__.pyc
byte-compiling /usr/lib/python2.5/site-packages/luckybot/views/console.py to console.pyc
byte-compiling /usr/lib/python2.5/site-packages/luckybot/views/base.py to base.pyc
byte-compiling /usr/lib/python2.5/site-packages/luckybot/bot/irc.py to irc.pyc
byte-compiling /usr/lib/python2.5/site-packages/luckybot/bot/main.py to main.pyc
byte-compiling /usr/lib/python2.5/site-packages/luckybot/bot/language.py to language.pyc
byte-compiling /usr/lib/python2.5/site-packages/luckybot/bot/auth.py to auth.pyc
byte-compiling /usr/lib/python2.5/site-packages/luckybot/bot/__init__.py to __init__.pyc
byte-compiling /usr/lib/python2.5/site-packages/luckybot/bot/plugins.py to plugins.pyc
running install_scripts
copying build/scripts-2.5/run -> /usr/bin
changing mode of /usr/bin/run to 755
running install_data
creating /usr/luckybot
copying luckybot/misc.py -> /usr/luckybot/
copying luckybot/__init__.pyc -> /usr/luckybot/
copying luckybot/decorators.py -> /usr/luckybot/
copying luckybot/path.py -> /usr/luckybot/
copying luckybot/__init__.py -> /usr/luckybot/
creating /usr/luckybot/plugins
creating /usr/luckybot/plugins/botactions
copying luckybot/plugins/botactions/__init__.py -> /usr/luckybot/plugins/botactions
creating /usr/luckybot/plugins/auth
copying luckybot/plugins/auth/__init__.py -> /usr/luckybot/plugins/auth
creating /usr/luckybot/plugins/botinfo
copying luckybot/plugins/botinfo/__init__.py -> /usr/luckybot/plugins/botinfo
creating /usr/luckybot/plugins/radio
copying luckybot/plugins/radio/__init__.py -> /usr/luckybot/plugins/radio
creating /usr/luckybot/plugins/rss
copying luckybot/plugins/rss/language.ini -> /usr/luckybot/plugins/rss
copying luckybot/plugins/rss/rss.db -> /usr/luckybot/plugins/rss
copying luckybot/plugins/rss/__init__.py -> /usr/luckybot/plugins/rss
creating /usr/luckybot/plugins/sysinfo
copying luckybot/plugins/sysinfo/.DS_Store -> /usr/luckybot/plugins/sysinfo
copying luckybot/plugins/sysinfo/__init__.py -> /usr/luckybot/plugins/sysinfo
creating /usr/luckybot/plugins/plugin_managment
copying luckybot/plugins/plugin_managment/__init__.py -> /usr/luckybot/plugins/plugin_managment
creating /usr/luckybot/plugins/tvgids
copying luckybot/plugins/tvgids/__init__.py -> /usr/luckybot/plugins/tvgids
creating /usr/luckybot/plugins/poker
copying luckybot/plugins/poker/deck.py -> /usr/luckybot/plugins/poker
creating /usr/luckybot/plugins/lastfm
copying luckybot/plugins/lastfm/__init__.py -> /usr/luckybot/plugins/lastfm
creating /usr/luckybot/luckynet
copying luckybot/luckynet/protocol.py -> /usr/luckybot/luckynet
copying luckybot/luckynet/__init__.py -> /usr/luckybot/luckynet
creating /usr/luckybot/luckynet/protocols
copying luckybot/luckynet/protocols/irc.py -> /usr/luckybot/luckynet/protocols
copying luckybot/luckynet/protocols/__init__.py -> /usr/luckybot/luckynet/protocols
copying luckybot/luckynet/protocols/simple.py -> /usr/luckybot/luckynet/protocols
creating /usr/luckybot/luckynet/connection
copying luckybot/luckynet/connection/__init__.py -> /usr/luckybot/luckynet/connection
copying luckybot/luckynet/connection/glib.py -> /usr/luckybot/luckynet/connection
creating /usr/luckybot/views
copying luckybot/views/__init__.py -> /usr/luckybot/views
copying luckybot/views/console.py -> /usr/luckybot/views
copying luckybot/views/base.py -> /usr/luckybot/views
creating /usr/luckybot/views/gui
copying luckybot/views/gui/config.py -> /usr/luckybot/views/gui
copying luckybot/views/gui/__init__.py -> /usr/luckybot/views/gui
creating /usr/luckybot/bot
copying luckybot/bot/irc.py -> /usr/luckybot/bot
copying luckybot/bot/main.py -> /usr/luckybot/bot
copying luckybot/bot/language.py -> /usr/luckybot/bot
copying luckybot/bot/auth.py -> /usr/luckybot/bot
copying luckybot/bot/__init__.py -> /usr/luckybot/bot
copying luckybot/bot/plugins.py -> /usr/luckybot/bot
creating /usr/luckybot/data
copying luckybot/data/settings.ini -> /usr/luckybot/data
creating /usr/luckybot/data/glade
copying luckybot/data/glade/mainwindow.glade -> /usr/luckybot/data/glade
copying luckybot/data/glade/config.glade -> /usr/luckybot/data/glade
creating /usr/luckybot/data/pixmaps
copying luckybot/data/pixmaps/logo_16.png -> /usr/luckybot/data/pixmaps
copying luckybot/data/pixmaps/logo_192.png -> /usr/luckybot/data/pixmaps
copying luckybot/data/pixmaps/logo_64.png -> /usr/luckybot/data/pixmaps
copying luckybot/data/pixmaps/logo_32.png -> /usr/luckybot/data/pixmaps
copying luckybot/data/pixmaps/logo_14.png -> /usr/luckybot/data/pixmaps
running install_egg_info
Writing /usr/lib/python2.5/site-packages/luckybot-4.0alpha1.egg-info
gijs@gijs-8:~/Downloads/luckybot-4.0alpha1$ python run
Traceback (most recent call last):
  File "/home/gijs/Downloads/luckybot-4.0alpha1/luckybot/bot/plugins.py", line 329, in load_plugin
    module_obj = imp.load_source(name, os.path.join(path,'__init__.py'))
IOError: [Errno 2] Bestand of map bestaat niet
Traceback (most recent call last):
  File "/home/gijs/Downloads/luckybot-4.0alpha1/luckybot/views/gui/__init__.py", line 371, in do_connect
    page.connect_to_server()
  File "/home/gijs/Downloads/luckybot-4.0alpha1/luckybot/views/gui/__init__.py", line 219, in connect_to_server
    self.open_connection(config)
  File "/home/gijs/Downloads/luckybot-4.0alpha1/luckybot/views/gui/__init__.py", line 186, in open_connection
    connection.open((host, port))
  File "/home/gijs/Downloads/luckybot-4.0alpha1/luckybot/luckynet/connection/glib.py", line 51, in open
    super(GlibConnection, self).open(addr)
  File "/home/gijs/Downloads/luckybot-4.0alpha1/luckybot/luckynet/connection/__init__.py", line 159, in open
    super(AsyncConnection, self).open(addr)
  File "/home/gijs/Downloads/luckybot-4.0alpha1/luckybot/luckynet/connection/__init__.py", line 83, in open
    raise socket.error, e
socket.error: (111, 'Verbinding is geweigerd')
Traceback (most recent call last):
  File "/home/gijs/Downloads/luckybot-4.0alpha1/luckybot/views/gui/__init__.py", line 371, in do_connect
    page.connect_to_server()
  File "/home/gijs/Downloads/luckybot-4.0alpha1/luckybot/views/gui/__init__.py", line 219, in connect_to_server
    self.open_connection(config)
  File "/home/gijs/Downloads/luckybot-4.0alpha1/luckybot/views/gui/__init__.py", line 186, in open_connection
    connection.open((host, port))
  File "/home/gijs/Downloads/luckybot-4.0alpha1/luckybot/luckynet/connection/glib.py", line 51, in open
    super(GlibConnection, self).open(addr)
  File "/home/gijs/Downloads/luckybot-4.0alpha1/luckybot/luckynet/connection/__init__.py", line 159, in open
    super(AsyncConnection, self).open(addr)
  File "/home/gijs/Downloads/luckybot-4.0alpha1/luckybot/luckynet/connection/__init__.py", line 83, in open
    raise socket.error, e
socket.error: (111, 'Verbinding is geweigerd')
/home/gijs/Downloads/luckybot-4.0alpha1/luckybot/views/gui/config.py:62: Warning: unable to set property `editable' of type `gboolean' from value of type `gchararray'
  return self.window.run()
Saving..
gijs@gijs-8:~/Downloads/luckybot-4.0alpha1$
Wellicht zie jij wat er niet goed gaat.

Met vriendelijke groet,

Gijs


Nee dat klopt ;) Ben vergeten die plugin uit de release te halen, want die plugin was ik ooit mee begonnen, nooit mee verder gegaan :P Gewoon negeren die melding of in je settings.ini dit zetten, onder [Disabled]:
poker = True

Offline Gijsbert

  • Lid
  • Steunpunt: Ja
Re: Lucky IRC Bot
« Reactie #5 Gepost op: 2009/02/12, 00:20:05 »
Hoe kan ik een server toevoegen ??? Verbinden gaat niet, zie mijn dump in mijn vorige post onderaan. Of toch maar even wachten op de bèta versie ???

Met vriendelijke groet,

Gijs
In der Beschränkung zeigt sich der Meister.

Offline Sh4wn

  • Lid
    • http://www.return1.net
  • Steunpunt: Nee
Re: Lucky IRC Bot
« Reactie #6 Gepost op: 2009/02/12, 11:00:10 »
Hoe kan ik een server toevoegen ??? Verbinden gaat niet, zie mijn dump in mijn vorige post onderaan. Of toch maar even wachten op de bèta versie ???

Met vriendelijke groet,

Gijs


Server toevoegen doe je in je settings.ini :) Heb je de instellingen gewijzigd? Want de standaard server klopt volgens mij idd niet.

Offline Cumulus007

  • Lid
  • Steunpunt: Nee
Re: Lucky IRC Bot
« Reactie #7 Gepost op: 2009/03/04, 16:57:46 »
Mooi stuk software :) Ik probeer momenteel ook wat te kloten met bots, maar het lukt maar niet. Ik zal jouw source maar eens bekijken :)