Created
May 8, 2014 07:47
-
-
Save anonymous/c3dde79e7d0e3ef60fff to your computer and use it in GitHub Desktop.
Saleem plugin buat hexchat
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import hexchat | |
__module_name__ = "saleem" | |
__module_version__ = "1.0" | |
__module_description__ = "bilang saleem ke semua nick di channel" | |
def saleem_callback(word, word_eol, userdata): | |
greeting = "saleem" | |
if len(word) >= 2: | |
greeting = word_eol[1] | |
users = hexchat.get_list("users") | |
owner_nick = hexchat.get_info("nick") | |
nicks = [ user.nick for user in users if user.nick != owner_nick ] | |
nicks_string = " ".join(nicks) | |
hexchat.command("SAY {} {}".format(greeting, nicks_string)) | |
return hexchat.EAT_ALL | |
SALEEM_HELP="""/SALEEM <greeting> | |
Bilang <greeting> (default: saleem) ke semua nick di channel | |
""" | |
hexchat.hook_command("SALEEM", saleem_callback, help=SALEEM_HELP) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment