<s> import time <EOL> import socket <EOL> def connect ( settings_server , settings_port , settings_botnick , settings_botpass , settings_channel , settings_owner ) : <EOL> try : <EOL> irc = socket . socket ( socket . AF_INET , socket . SOCK_STREAM ) <EOL> irc . connect ( ( settings_server , settings_port ) ) <EOL> irc . send ( "<STR_LIT>" + settings_botpass + "<STR_LIT:\r\n>" ) <EOL> irc . send ( "<STR_LIT>" + settings_botnick + "<STR_LIT:\r\n>" ) <EOL> irc . send ( <EOL> "<STR_LIT>" + settings_botnick + "<STR_LIT:U+0020>" + settings_botnick + "<STR_LIT:U+0020>" + settings_botnick + "<STR_LIT>" + settings_owner + "<STR_LIT:\r\n>" ) <EOL> irc . send ( "<STR_LIT>" + settings_channel + "<STR_LIT:\r\n>" ) <EOL> return irc <EOL> except : <EOL> time . sleep ( <NUM_LIT:10> ) <EOL> connect ( settings_server , settings_port , settings_botnick , settings_botpass , settings_channel , settings_owner ) </s>
