Exemple #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)
Exemple #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)
Exemple #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)
Exemple #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)
Exemple #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)
Exemple #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)
Exemple #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)
Exemple #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)
Exemple #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)
Exemple #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)
Exemple #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)
Exemple #12
0
 def register(self):
     return Template('userreg').render()
Exemple #13
0
 def login(self):
     return Template('userlogin').render()