Exemplo n.º 1
0
    def session(self):
        try:
            conn = get_xmlrpc_connection()
        except:
            webinfo.response.status = "302 Found"
            webinfo.response.headers['location'] = 'login'
            return ''

        return Template('application').render(webinfo=webinfo, conn=conn)
Exemplo n.º 2
0
    def list(self):
        try:
            conn = get_xmlrpc_connection()
        except:
            webinfo.response.status = "302 Found"
            webinfo.response.headers['location'] = '/user/login'
            return ''

        return Template('akill-list').render(webinfo=webinfo, conn=conn)
Exemplo n.º 3
0
    def write(self, to=''):
        try:
            conn = get_xmlrpc_connection()
        except:
            webinfo.response.status = "302 Found"
            webinfo.response.headers['location'] = '/user/login'
            return ''

        return Template('memowrite').render(webinfo=webinfo, conn=conn, to=to)
Exemplo n.º 4
0
    def ignore_add(self):
        try:
            conn = get_xmlrpc_connection()
        except:
            webinfo.response.status = "302 Found"
            webinfo.response.headers['location'] = '/user/login'
            return ''

        return Template('memoignoreadd').render(webinfo=webinfo, conn=conn)
Exemplo n.º 5
0
    def forward_commit(self, to, message_id):
        try:
            conn = get_xmlrpc_connection()
        except:
            webinfo.response.status = "302 Found"
            webinfo.response.headers['location'] = '/user/login'
            return ''

        conn.memoserv.forward(to, message_id)
        return Template('memosent').render(webinfo=webinfo, conn=conn, to=to)
Exemplo n.º 6
0
    def settings(self, channel):
        try:
            conn = get_xmlrpc_connection()
        except:
            webinfo.response.status = "302 Found"
            webinfo.response.headers['location'] = '/user/login'
            return ''

        return Template('channeleditsettings').render(webinfo=webinfo,
                                                      conn=conn,
                                                      channel=channel)
Exemplo n.º 7
0
    def forward(self, id, to=''):
        try:
            conn = get_xmlrpc_connection()
        except:
            webinfo.response.status = "302 Found"
            webinfo.response.headers['location'] = '/user/login'
            return ''

        return Template('memoforward').render(webinfo=webinfo,
                                              conn=conn,
                                              message_id=id,
                                              to=to)
Exemplo n.º 8
0
    def delete_confirm(self, id):
        try:
            conn = get_xmlrpc_connection()
        except:
            webinfo.response.status = "302 Found"
            webinfo.response.headers['location'] = '/user/login'
            return ''

        conn.memoserv.delete(id)
        return Template('memodeleted').render(webinfo=webinfo,
                                              conn=conn,
                                              id=id)
Exemplo n.º 9
0
    def request_vhost(self, vhost):
        try:
            conn = get_xmlrpc_connection()
        except:
            webinfo.response.status = "302 Found"
            webinfo.response.headers['location'] = 'login'
            return ''

        conn.hostserv.request(vhost)

        webinfo.response.headers['refresh'] = '5; URL=account'
        return Template('genericmessage').render(
            webinfo=webinfo,
            conn=conn,
            message='Your vHost %s has been requested' % vhost)
Exemplo n.º 10
0
    def update_email(self, new_email):
        try:
            conn = get_xmlrpc_connection()
        except:
            webinfo.response.status = "302 Found"
            webinfo.response.headers['location'] = 'login'
            return ''

        conn.nickserv.set_email(new_email)

        webinfo.response.headers['refresh'] = '5; URL=account'
        return Template('genericmessage').render(
            webinfo=webinfo,
            conn=conn,
            message='Your e-mail has been set to %s' % new_email)
Exemplo n.º 11
0
    def process_registration(self, nickname, password, email):
        message = ''

        conn = AthemeXMLConnection(XMLRPC_PATH)
        message = conn.register(nickname, password, email)

        #		try:
        #		except:
        #			webinfo.response.status = "302 Found"
        #			webinfo.response.headers['location'] = 'register'
        #			return ''

        webinfo.response.headers['location'] = 'account'
        return Template('regmessage').render(webinfo=webinfo,
                                             conn=conn,
                                             message=message)
Exemplo n.º 12
0
 def register(self):
     return Template('userreg').render()
Exemplo n.º 13
0
 def login(self):
     return Template('userlogin').render()