Edit Function migpy

Function rpos: untuk menghapus harus mengetik secara lengkap seluruh teks.

def rpos(self, arg):
if arg in self.apss:
try: ccpath = 'e:\\terimeri\\aa\\'
self.apss.remove(arg)
aps = '\r\n'.join(self.apss)
o = open(ccpath + 'autopost.bot', 'w')
o.write(aps)
o.close()
return '%s removed from autopostbot' % arg
except: return 'remove %s failed (rofl)' % arg
else: return '%s isn\'t in autopostbot list (rofl)' % arg

Untuk bisa menghapus hanya dengan menggunakan kata depan saja harus diubah menjadi

def rpos(self, arg):
try: ccpath = 'c:\\terimeri\\aa\\'
aps = '\r\n'.join([x for x in self.apss if not x.startswith(arg)])
o = open(ccpath + 'autopost.bot', 'w')
o.write(aps)
o.close()
return '%s removed from autopostbot' % arg
except: return 'remove %s failed (rofl)' % arg

Funtion autopost

if self.bot['autopost'] and len(self.rooms) > 0 and (self.output.aliveseq % int(self.bot['intval'])) == 1 :
elif self.bot['autopost'] == 'acak'
for room in self.rooms:
i = random.randint(0, (len(self.post) - 1))
bytes = self.output.pack('textRoom',[self.user['name'], room, self.post[i]])
self._write(bytes)

Function autowc

if self.bot['autowc'] != '' and self.bot['autowc'] != 0 and content[2].lower() == content[4].lower() and content[8].find('has entered') > 0 :
textwc = '' cek = content[8].split(' ')
fm = open('e:\\terimeri\\aa\\awctext.bot')
dm = fm.read() teks = dm.split('\r\n') fm.close()
dick = random.choice(teks)
bytes = self.output.pack('textRoom',, content[4], dick.replace('%s', cek[0])])
Facebook Comments

Leave a Reply

Your email address will not be published. Required fields are marked *