Module problem with 4.1.1

Jim Sanders <[email protected]> Mon, 12 Jul 2004 13:25:29 -0500
Newsgroups gmane.comp.games.mud.client.lyntin
Message-ID <[email protected]>
I've just put together a quick module to monitor my hp bar, and I've
gotten it to load successfully and I'm able to pass variables to it.
Everything works more or less ok until within the module I put in a
test statement just to see if its functional.  It evaluates whether
hp/maxhp is less than 1.0.  If it is, it tries to send output to the
mud.  I've tried having it just send a standard emote or a #showme IT
WORKS.  The actual evaluation lines in the module are:

if (1.0 * hp) / maxhp < 1.0:
   exported.lyntin_command("#showme IT WORKS")

However, as soon as the above statement evaluates as true, I get the
following error:

! Traceback (most recent call last):
!   File "/usr/lib/python2.2/site-packages/lyntin/modules/action.py",
line 208, in checkA
ctions
!     exported.lyntin_command(response, internal=1, session=self._ses)
!   File "/usr/lib/python2.2/site-packages/lyntin/exported.py", line
96, in lyntin_comman
d
!     myengine.handleUserData(text, internal, session)
!   File "/usr/lib/python2.2/site-packages/lyntin/engine.py", line
487, in handleUserData

!     session.handleUserData(mem, internal)
!   File "/usr/lib/python2.2/site-packages/lyntin/session.py", line
415, in handleUserDat
a

!     spamargs = exported.filter_mapper_hook_spam("user_filter_hook", spamargs)
!   File "/usr/lib/python2.2/site-packages/lyntin/exported.py", line
681, in filter_mappe
r_hook_spam
!     output = mem(argmap)
!   File "/usr/lib/python2.2/site-packages/lyntin/commandmanager.py",
line 287, in filter

!     command(ses, argdict, input)
!   File "/home/jsanders/lyntin-4.1.1/lyntin/hpEval.py", line 20, in
processhp_cmd
!     exported.lyntin_command("fark")
!   File "/home/jsanders/lyntin-4.1.1/lyntin/exported.py", line 98, in
lyntin_command
!     myengine.handleUserData(text, internal)
! AttributeError: 'NoneType' object has no attribute 'handleUserData'
!

I'm using lyntin4.1.1, and I'm not really sure what the problem is.
Is the syntax for sending text back to the mud incorrect for 4.1.1?
I've not been able to find an example that seems on point.

Thanks for any help,

Jim

PS If anyone could tell me how to bind numpad keys to directions using
cursesui with 4.1.1, I would greatly appreciate it  :)

--
I believe, if we take habitual drunkards as a class, their heads and
their hearts will bear an advantageous comparison with those of any
other class.

Abraham Lincoln


-------------------------------------------------------
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 - 
digital self defense, top technical experts, no vendor pitches, 
unmatched networking opportunities. Visit www.blackhat.com