[available] GMCP in Mudlet

Post Reply
User avatar
Vadi
Posts: 5048
Joined: Sat Mar 14, 2009 3:13 pm

[available] GMCP in Mudlet

Post by Vadi »

GMCP is available on Mudlet 2.0, GMCP documentation for Mudlet is here.

GMCP is parsed and stored for you in the gmcp table. Events are called for new GMCP data in the same way as ATCP; except they're prefixed with g (ie, gRoomName).

Because GMCP allows you to enable/disable modules on the fly, it really doesn't matter what does Mudlet enables initially for you. See: http://www.ironrealms.com/gmcp-doc . Although I suspect keeping track of the things we enabled locally would be helpful - I'd appreciate it if someone wrote a little framework to make use of this.

Updated 8 Oct 2010: Added support for IRE.Composer

User avatar
tsuujin
Posts: 695
Joined: Fri Feb 26, 2010 12:59 am
Location: California
Contact:

Re: GMCP in Mudlet

Post by tsuujin »

Thank you! I'll be testing this tomorrow for sure.

I have to admit that GMCP looks insanely useful from a system builder's point of view.

User avatar
tsuujin
Posts: 695
Joined: Fri Feb 26, 2010 12:59 am
Location: California
Contact:

Re: GMCP in Mudlet

Post by tsuujin »

I find it really odd that they didn't break charvitals down into a table.

User avatar
Vadi
Posts: 5048
Joined: Sat Mar 14, 2009 3:13 pm

Re: GMCP in Mudlet

Post by Vadi »

Yes, see - http://www.mudstandards.org/forum/viewt ... ?f=7&t=120

Did you get it working though for yourself or did you get that from my link?

User avatar
tsuujin
Posts: 695
Joined: Fri Feb 26, 2010 12:59 am
Location: California
Contact:

Re: GMCP in Mudlet

Post by tsuujin »

I'm having problems getting it to compile, actually. I don't seem to have any of the required libraries and have had to add them one by one as I go... and at the moment I'm stuck on the PCRE requirement. I installed everything with "pcre" in it from ubuntu's repo and it still can't seem to find it.

User avatar
tsuujin
Posts: 695
Joined: Fri Feb 26, 2010 12:59 am
Location: California
Contact:

Re: GMCP in Mudlet

Post by tsuujin »

Ok, I can't figure out how to get lrex to compile.

I downloaded the lib from http://luaforge.net/frs/?group_id=63 (2.4.0), navitage to the directory, type make and get this:
make -C src/pcre -f rex_pcre.mak
make[1]: Entering directory `/home/tsuujin/lrexlib-2.4.0/lrexlib-2.4.0/src/pcre'
gcc -W -Wall -g -DREX_OPENLIB=luaopen_rex_pcre -DREX_LIBNAME=\"rex_pcre\" -c -o lpcre.o lpcre.c
lpcre.c:10:17: error: lua.h: No such file or directory
lpcre.c:11:21: error: lauxlib.h: No such file or directory
In file included from lpcre.c:12:
../common.h:55: error: expected specifier-qualifier-list before ‘lua_State’
../common.h:71: error: expected declaration specifiers or ‘...’ before ‘lua_State’
../common.h:82: error: expected ‘)’ before ‘*’ token
../common.h:83: error: expected ‘)’ before ‘*’ token
../common.h:84: error: expected ‘)’ before ‘*’ token
../common.h:86: error: expected ‘)’ before ‘*’ token
lpcre.c:14: error: expected ‘)’ before ‘*’ token
lpcre.c:15: error: expected ‘)’ before ‘*’ token
lpcre.c:33: error: expected ‘)’ before ‘*’ token
lpcre.c:36: error: expected declaration specifiers or ‘...’ before ‘lua_State’
lpcre.c:74: error: expected ‘)’ before ‘*’ token
In file included from lpcre.c:78:
../algo.h:9: error: expected ‘)’ before ‘*’ token
../algo.h:12: error: expected ‘)’ before ‘*’ token
../algo.h:13: error: expected ‘)’ before ‘*’ token
../algo.h:60: error: expected ‘)’ before ‘*’ token
../algo.h:73: error: expected ‘)’ before ‘*’ token
../algo.h:86: error: expected ‘)’ before ‘*’ token
../algo.h:99: error: expected ‘)’ before ‘*’ token
../algo.h:106: error: expected ‘)’ before ‘*’ token
../algo.h:116: error: expected ‘)’ before ‘*’ token
../algo.h:125: error: expected ‘)’ before ‘*’ token
../algo.h:146: error: expected ‘)’ before ‘*’ token
../algo.h:159: error: expected ‘)’ before ‘*’ token
../algo.h:173: error: expected ‘)’ before ‘*’ token
../algo.h:181: error: expected ‘)’ before ‘*’ token
../algo.h:187: error: expected ‘)’ before ‘*’ token
../algo.h:200: error: expected ‘)’ before ‘*’ token
../algo.h:380: error: expected ‘)’ before ‘*’ token
../algo.h:401: error: expected ‘)’ before ‘*’ token
../algo.h:421: error: expected ‘)’ before ‘*’ token
../algo.h:426: error: expected ‘)’ before ‘*’ token
../algo.h:431: error: expected ‘)’ before ‘*’ token
../algo.h:493: error: expected ‘)’ before ‘*’ token
../algo.h:536: error: expected ‘)’ before ‘*’ token
../algo.h:559: error: expected ‘)’ before ‘*’ token
../algo.h:579: error: expected ‘)’ before ‘*’ token
../algo.h:589: error: expected ‘)’ before ‘*’ token
../algo.h:609: error: expected ‘)’ before ‘*’ token
../algo.h:645: error: expected ‘)’ before ‘*’ token
../algo.h:648: error: expected ‘)’ before ‘*’ token
../algo.h:651: error: expected ‘)’ before ‘*’ token
../algo.h:654: error: expected ‘)’ before ‘*’ token
../algo.h:661: error: expected ‘)’ before ‘*’ token
lpcre.c:90: error: expected ‘)’ before ‘*’ token
lpcre.c:95: error: expected ‘)’ before ‘*’ token
lpcre.c:120: error: expected ‘)’ before ‘*’ token
lpcre.c:131: error: expected ‘)’ before ‘*’ token
lpcre.c:141: error: expected ‘)’ before ‘*’ token
lpcre.c:148: error: expected ‘)’ before ‘*’ token
lpcre.c:163: error: expected ‘)’ before ‘*’ token
lpcre.c:172: error: expected declaration specifiers or ‘...’ before ‘lua_State’
lpcre.c: In function ‘optlocale’:
lpcre.c:175: warning: implicit declaration of function ‘lua_isnoneornil’
lpcre.c:175: error: ‘L’ undeclared (first use in this function)
lpcre.c:175: error: (Each undeclared identifier is reported only once
lpcre.c:175: error: for each function it appears in.)
lpcre.c:176: warning: implicit declaration of function ‘lua_isstring’
lpcre.c:177: warning: implicit declaration of function ‘lua_tostring’
lpcre.c:180: warning: implicit declaration of function ‘check_chartables’
lpcre.c: At top level:
lpcre.c:185: error: expected ‘)’ before ‘*’ token
lpcre.c:231: error: expected ‘)’ before ‘*’ token
lpcre.c:255: error: expected ‘)’ before ‘*’ token
lpcre.c:306: error: expected ‘)’ before ‘*’ token
lpcre.c:333: error: expected ‘)’ before ‘*’ token
lpcre.c:345: error: expected ‘)’ before ‘*’ token
lpcre.c:354: error: expected ‘)’ before ‘*’ token
lpcre.c:360: error: expected ‘)’ before ‘*’ token
lpcre.c:365: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘chartables_meta’
lpcre.c:371: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘regex_meta’
lpcre.c:384: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘rexlib’
lpcre.c:402: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘int’
make[1]: *** [lpcre.o] Error 1
make[1]: Leaving directory `/home/tsuujin/lrexlib-2.4.0/lrexlib-2.4.0/src/pcre'
make: *** [build_pcre] Error 2
So... I guess I'm stuck for the moment. Been working on this for a few hours.

User avatar
Vadi
Posts: 5048
Joined: Sat Mar 14, 2009 3:13 pm

Re: GMCP in Mudlet

Post by Vadi »

Install the Lua dev headers?

User avatar
tsuujin
Posts: 695
Joined: Fri Feb 26, 2010 12:59 am
Location: California
Contact:

Re: GMCP in Mudlet

Post by tsuujin »

Vadi wrote:Install the Lua dev headers?
They are installed. I can find all of them in /usr/include/lua5.1. If I add that to my path, the same errors occur.

User avatar
tsuujin
Posts: 695
Joined: Fri Feb 26, 2010 12:59 am
Location: California
Contact:

Re: GMCP in Mudlet

Post by tsuujin »

ok! So I edit the make file config itself to point to the correct directory, and get a new (and much smaller) set of errors!
tsuujin@localhost:~/lrexlib-2.4.0/lrexlib-2.4.0$ make build_pcre
make -C src/pcre -f rex_pcre.mak
make[1]: Entering directory `/home/tsuujin/lrexlib-2.4.0/lrexlib-2.4.0/src/pcre'
ld -o rex_pcre.so.2.4 -shared lpcre.o lpcre_f.o ../common.o -lpcre -llua
ld: lpcre.o: relocation R_X86_64_32 against `.rodata' can not be used when making a shared object; recompile with -fPIC
lpcre.o: could not read symbols: Bad value
make[1]: *** [rex_pcre.so] Error 1
make[1]: Leaving directory `/home/tsuujin/lrexlib-2.4.0/lrexlib-2.4.0/src/pcre'
make: *** [build_pcre] Error 2

User avatar
Vadi
Posts: 5048
Joined: Sat Mar 14, 2009 3:13 pm

Re: GMCP in Mudlet

Post by Vadi »

Add -fPIC to CFLAGS (or however the compiler flags variable is called)

Post Reply