<commit_before>import hexchat

__module_name__ = "Nick to Server Tab"
__module_author__ = "PDog"
__module_version__ = "0.0.1"
__module_description__ = "Move nick change messages to the server tab"

moved = False

def move_cb(word, word_eol, userdata):
	global moved

	if moved:
		return
	else:
		network_context = hexchat.find_context(channel=hexchat.get_info("network"))
		
		moved = True
		network_context.emit_print("Change Nick", word[0], word[1])
		moved = False
		
		return hexchat.EAT_ALL

hexchat.hook_print("Change Nick", move_cb)
hexchat.prnt(__module_name__ + " version " + __module_version__ + " loaded")<commit_msg>Update nick2server.py<commit_after>import hexchat

__module_name__ = "Nick to Server Tab"
__module_author__ = "PDog"
__module_version__ = "0.0.2"
__module_description__ = "Move nick change messages to the server tab"

moved = False

def move_cb(word, word_eol, event):
	global moved

	if moved:
		return
	
	if event == "Change Nick":
		network_context = hexchat.find_context(channel=hexchat.get_info("network"))
		
		moved = True
		network_context.emit_print("Change Nick", word[0], word[1])
		moved = False
		
		return hexchat.EAT_ALL

hexchat.hook_print("Change Nick", move_cb, "Change Nick")
hexchat.prnt(__module_name__ + " version " + __module_version__ + " loaded")
{'fraction_non_alphanumeric': 0.10623556581986143, 'fraction_numerical': 0.008468052347959968, 'mean_word_length': 5.280193236714976, 'pattern_counts': {'":': 1, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6509019', 'n_tokens_mistral': 472, 'n_tokens_neox': 441, 'n_words': 107}