Turned comms into typeclassed objects.

This commit is contained in:
Kelketek 2013-09-28 22:23:30 -05:00
parent 39b69dcdc2
commit 851e6d00cc
28 changed files with 1000 additions and 291 deletions

21
src/comms/comms.py Normal file
View file

@ -0,0 +1,21 @@
"""
Default Typeclass for Comms.
See objects.objects for more information on Typeclassing.
"""
from src.typeclasses.typeclass import TypeClass
class Comm(TypeClass):
"""
This is the base class for all Comms. Inherit from this to create different
types of communication channels.
"""
def __init__(self, dbobj):
super(Comm, self).__init__(dbobj)
def format_message(self, msg):
"""
Takes a Msg (see models.Msg), and derives the output display for it on
the channel.
"""