Cosmetics.
[python-purple] / account.pyx
index 0e98548..503a87c 100644 (file)
@@ -29,7 +29,7 @@ cdef class Account:
     cdef account.PurpleAccount *__account
     cdef savedstatuses.PurpleSavedStatus *__sstatus
 
     cdef account.PurpleAccount *__account
     cdef savedstatuses.PurpleSavedStatus *__sstatus
 
-    def __cinit__(self, char *username, char *protocol_id):
+    def __init__(self, char *username, char *protocol_id):
         self.__account = account.c_purple_account_new(username, protocol_id)
 
     def set_password(self, password):
         self.__account = account.c_purple_account_new(username, protocol_id)
 
     def set_password(self, password):
@@ -50,14 +50,14 @@ cdef class Account:
         self.__sstatus = savedstatuses.c_purple_savedstatus_new(NULL, status.PURPLE_STATUS_AVAILABLE)
         savedstatuses.c_purple_savedstatus_activate(self.__sstatus)
 
         self.__sstatus = savedstatuses.c_purple_savedstatus_new(NULL, status.PURPLE_STATUS_AVAILABLE)
         savedstatuses.c_purple_savedstatus_activate(self.__sstatus)
 
-    def get_buddies_online(self, acc):
+    def get_buddies_online(self):
         cdef glib.GSList *iter
         cdef blist.PurpleBuddy *buddy
         buddies = []
         iter = blist.c_purple_find_buddies(self.__account, NULL)
         while iter:
             buddy = <blist.PurpleBuddy *> iter.data
         cdef glib.GSList *iter
         cdef blist.PurpleBuddy *buddy
         buddies = []
         iter = blist.c_purple_find_buddies(self.__account, NULL)
         while iter:
             buddy = <blist.PurpleBuddy *> iter.data
-            if <object> buddy and \
+            if <blist.PurpleBuddy *>buddy and \
                 account.c_purple_account_is_connected(blist.c_purple_buddy_get_account(buddy)) and \
                 status.c_purple_presence_is_online(blist.c_purple_buddy_get_presence(buddy)):
                 buddies += [buddy.name]
                 account.c_purple_account_is_connected(blist.c_purple_buddy_get_account(buddy)) and \
                 status.c_purple_presence_is_online(blist.c_purple_buddy_get_presence(buddy)):
                 buddies += [buddy.name]