You don't need frames to view this website. Flash communication server. Flash mx xml socket server.
Home
Main Menu
Home
- - - - - - -
What is Palabre ?
Features
News
FAQ
Forum
DEMO
- - - - - - -
Downloads !
Browse SVN
- - - - - - -
Search
Contact Us
- - - - - - -
Sourceforge Project Page
Python
Links
Palabre on Facebook






Actionscript for Multiplayer games
 
Download Palabre Flash Xml Socket Server DOWNLOAD Download Palabre Flash Xml Socket Server FORUM Download Palabre Flash Xml Socket Server FAQ Download Palabre Flash Xml Socket Server WHAT IS IT
 



Using Palabre ? Coming here for Support ? Please consider making an (even small) donation :)
Palabre Forum  


::post new topic::
Problem Registering New Module - 2008/03/14 21:37 Just getting my feet wet with modules. I've built a very simple module called:

existsQueries.py

Which (theoretically) receives the node <exists> and returns "I Exist!"

Here is the code (minus the GNU comment block):

Code:

 #!/usr/bin/env python # -*- coding: utf-8 -*- # Palabre - existsQueries.py class existsQueries:              def __init__(self,server):                 self.server server                 self.name "existsQueries"         self.server.registerAction(’onStartup’,self.name)                 # Registering the EXISTS node         self.server.registerNode('exists',self.name)                          return              def doNode(self,nodeName,node,client):                 if nodeName == 'exists':             client.clientSendMessage(self.server.formatMessage('exists',[],'I Exist!'))         return



I saved the module to /usr/local/lib/python2.4/site-packages/modules/

I stopped palabre, edited the /etc/palabre.conf to read:

[modules]

list = dbQueries,helloworld,simpleLogin,existsQueries

I restarted palabre, and got this:

Code:

 [root@someserver palabre-src-0.6b]# python Palabre.py INFO     No log file has been specified INFO     Palabre will only print log to console INFO     Running onxx.xxx.xx.xxx INFO     Port2468 INFO     Palabre is running on a public interface INFO     Other computers will be able to access it INFO     4 Module(sto load INFO     Module dbQueries Loaded INFO     Module helloworld Loaded INFO     Module simpleLogin Loaded ERROR    ERROR No module named existsQueries ERROR    Module existsQueries  Failed to load INFO     3 Module(sloaded INFO     Connection to BDD      SKIPPED ERROR    dbQueries:DATABASE ACCESS IS NOT CONFIGURED ERROR    dbQueries:I wont accept any request



What am I missing?

Help me, Obi Wan!
  reply | quote

      Topics Author Date
    thread link
Problem Registering New Module
chromecow 2008/03/14 21:37
    thread link
thread linkthread link Re:Problem Registering New Module
chromecowcow 2008/03/25 18:41
    thread link
thread linkthread linkthread link Re:Problem Registering New Module
badben 2008/10/30 15:39
    thread link
thread linkthread linkthread linkthread link Re:Problem Registering New Module
develephant 2009/07/30 06:11
::post new topic::