support of xmpp protocol

14 views
Skip to first unread message

aureli...@gmail.com

unread,
Jun 9, 2009, 5:11:52 AM6/9/09
to Evennia
Hi,

Is it possible to use xmpp like we use telnet ?

I think that lot's of people don't play mud because of the difficulty
to use telnet.

Just an idea to develop ...

++

Aurélien.

Ozan Türkyılmaz

unread,
Jun 9, 2009, 8:37:12 AM6/9/09
to eve...@googlegroups.com
2009/6/9 aureli...@gmail.com <aureli...@gmail.com>:

>
> Hi,
>
> Is it possible to use xmpp like we use telnet ?
>
> I think that lot's of people don't play mud because of the difficulty
> to use telnet.
>
difficulty of telnet? are you sure we are thinking of same thing.
telnet is very simple protocol
and program; point it and connect. i know telnet comes with XP and
later is ugly as hell. i miss old telnet program, too.
--
Ozan
オザン

Close the world, txEn eht nepO

aureli...@gmail.com

unread,
Jun 9, 2009, 11:39:22 AM6/9/09
to Evennia


On Jun 9, 2:37 pm, Ozan Türkyılmaz <ozan.turkyil...@gmail.com> wrote:
> 2009/6/9 aurelien.b...@gmail.com <aurelien.b...@gmail.com>:
>
> > Hi,
>
> > Is it possible to use xmpp like we use telnet ?
>
> > I think that lot's of people don't play mud because of the difficulty
> > to use telnet.
>
> difficulty of telnet? are you sure we are thinking of same thing.
> telnet is very simple protocol
> and program; point it and connect. i know telnet comes with XP and
> later is ugly as hell. i miss old telnet program, too.

No, I just think that a protocol like xmpp is more user friendly for
the player.

Using xmpp should allow player to play with their jabber account
easily. Juste add un buddy named for example jabb...@jabber.org and
go to play :) With this solution we can too bridge to msn/yahoo
network and more ...

I'm wondering how difficult it is to add a xmpp support to Evennia.

++

Aurélien


Greg Taylor

unread,
Jun 9, 2009, 1:28:52 PM6/9/09
to eve...@googlegroups.com
From a Twisted and Evennia end, no this is extremely simple. You'd just need to add another protocol object and have it listen on another port. Check out server.py for an example on how that fits together.

I know Twisted has some messenger modules in it (AIM, Yahoo, maybe MSN), but I'm not sure about Jabber. It'd be up to you to find a Python implementation of it (I'm sure there's one out there).

I hope this helps!
Greg
--
Greg Taylor
Clemson University, Class of 2009
Cell: (864) 888-7964
http://gc-taylor.com

Ozan Türkyılmaz

unread,
Jun 10, 2009, 10:39:02 AM6/10/09
to eve...@googlegroups.com
09 Haziran 2009 Salı 20:28 tarihinde, Greg Taylor
<gta...@l11solutions.com> adlı kullanıcı şunu yazmış:

> From a Twisted and Evennia end, no this is extremely simple. You'd just need
> to add another protocol object and have it listen on another port. Check out
> server.py for an example on how that fits together.
>
> I know Twisted has some messenger modules in it (AIM, Yahoo, maybe MSN), but
> I'm not sure about Jabber. It'd be up to you to find a Python implementation
> of it (I'm sure there's one out there).
>
there is severeal Python implementation i did see. and no i did not
checked them.

Rob Caskey

unread,
Jun 15, 2009, 9:48:20 AM6/15/09
to Evennia
http://pr0t0n.homeip.net:8080/ has an example of a web-enhanced telnet
gateway pointing to an ever-so-slightly-modified evennia that you may
find interesting.

Client source is on http://code.google.com/p/sauerville/source/browse/#svn/trunk/teltola
and if you are interested I'll be glad to get you some sample code for
evennia.

--Rob

On Jun 10, 10:39 am, Ozan Türkyılmaz <ozan.turkyil...@gmail.com>
wrote:
> 09 Haziran 2009 Salı 20:28 tarihinde, Greg Taylor
> <gtay...@l11solutions.com> adlı kullanıcı şunu yazmış:> From a Twisted and Evennia end, no this is extremely simple. You'd just need

Griatch

unread,
Jun 24, 2009, 8:06:23 AM6/24/09
to Evennia
Cool! I'd be very interested in any sample code you could supply!
.
Griatch

On Jun 15, 3:48 pm, Rob Caskey <robjcas...@gmail.com> wrote:
> http://pr0t0n.homeip.net:8080/has an example of a web-enhanced telnet
> gateway pointing to an ever-so-slightly-modified evennia that you may
> find interesting.
>
> Client source is onhttp://code.google.com/p/sauerville/source/browse/#svn/trunk/teltola

Rob Caskey

unread,
Jul 8, 2009, 11:40:00 AM7/8/09
to Evennia
Let's see,

I used the example's custom basic object to create my own basic object
that inherits from the original but started over-riding methods like
return_appearance to return different formatting to rtclient-enhanced
sessions:

if description is not None:
if rtclient:
description = "\xf0<div class='room_desc'>\xf2%s\xf0</
div>\xf2" % (description ,)
retval = (title_format+"\r\n%s") % (
target_obj.get_name(show_dbref=show_dbrefs),
description,
)
else:
retval = title_format % (
target_obj.get_name(show_dbref=show_dbrefs),
)

and added a cmd at the login screen which is automatically run by the
connecting client

from src.cmdtable import GLOBAL_UNCON_CMD_TABLE
from src.config.models import ConfigValue

def cmd_rtclient(command):
"""
Flag the session as supporting rtclient and send a custom hello
"""
session = command.session
session.rtclient = True
login_html = """
<div id='loginForm'>
<div id='existingCharacter'>
<h1>Login</h1>
<form method='post' onsubmit="server.handle('sendInput','connect
'+this.email.value+' '+this.password.value);return false;">
<table>
<tr><td>Email: </td><td><input type='text' name='email'</td></tr>
<tr><td>Password: </td><td><input type='password' name='password'</
td></tr>
<tr><td colspan='2'><input type='submit' value='Log In'> or <a
href='#' onclick='document.getElementById
("existingCharacter").style.display="none";document.getElementById
("createCharacter").style.display="block";return false;'>create a new
character</a></td></tr>
</table>
</form>
</div>
<div id='createCharacter' style='display:none'>
<form method='post' onsubmit="server.handle('sendInput', 'create \
\&quot;'+this.username.value+'\\&quot; '+this.email.value+'
'+this.password.value);return false;">
<h1>Create a Character</h1>
<table>
<tr><td>Username: </td><td><input type='text' name='username'</td></
tr>
<tr><td>Email: </td><td><input type='text' name='email'</td></tr>
<tr><td>Password: </td><td><input type='password' name='password'</
td></tr>
<tr><td colspan='2'><input type='submit' value='Create Character'> or
<a href='#' onclick='document.getElementById
("createCharacter").style.display="none";document.getElementById
("existingCharacter").style.display="block";return false;'>log into
existing character</a></td></tr>
</table>
</form>
</div>
</div>
"""
session.msg("\xf1holder=document.getElementById
('commandOutput');while(holder.hasChildNodes()) holder.removeChild
(holder.lastChild);\xf2\n\xf0"+login_html+"\xf2")
GLOBAL_UNCON_CMD_TABLE.add_command("rtclient", cmd_rtclient)




--Rob

robertj@pr0t0n:~/cvs/evennia/src$ svn diff
Index: ansi.py
===================================================================
--- ansi.py (revision 635)
+++ ansi.py (working copy)
@@ -45,6 +45,13 @@
ansi["return"] = "\r\n"
ansi["tab"] = "\t"
ansi["space"] = " "
+
+ # rtclient control characters
+ ansi["html_start"] = "\xf0"
+ ansi["javascript_start"] = "\xf1"
+ ansi["unformatted_start"] = "\xf2"
+ ansi["start_chunk"] = "\xf3"
+ ansi["end_chunk"] = "\xf4"

class BaseParser(object):
def parse_ansi(self, string, strip_ansi=False,
strip_formatting=False):
@@ -104,6 +111,11 @@
(r'%cC', ANSITable.ansi["back_cyan"]),
(r'%cw', ANSITable.ansi["white"]),
(r'%cW', ANSITable.ansi["back_white"]),
+ (r'%zh', ANSITable.ansi["html_start"]),
+ (r'%zj', ANSITable.ansi["javascript_start"]),
+ (r'%zz', ANSITable.ansi["unformatted_start"]),
+ (r'%zs', ANSITable.ansi["start_chunk"]),
+ (r'%ze', ANSITable.ansi["end_chunk"]),
]

class ExtendedANSIParser(MuxANSIParser):
Index: session.py
===================================================================
--- session.py (revision 635)
+++ session.py (working copy)
@@ -57,6 +57,7 @@
# The time when the user connected.
self.conn_time = time.time()
self.channels_subscribed = {}
+ self.rtclient = False

def disconnectClient(self):
"""
robertj@pr0t0n:~/cvs/evennia/src$


m> wrote:
> Cool! I'd be very interested in any sample code you could supply!
> .
> Griatch
>
> On Jun 15, 3:48 pm, Rob Caskey <robjcas...@gmail.com> wrote:
>
> >http://pr0t0n.homeip.net:8080/hasan example of a web-enhanced telnet

Griatch

unread,
Sep 2, 2009, 4:38:35 AM9/2/09
to Evennia
@Rob Caskey

Thanks! An interesting read, fun to see how it can be done. :)
.
Griatch
> > >http://pr0t0n.homeip.net:8080/hasanexample of a web-enhanced telnet
Reply all
Reply to author
Forward
0 new messages