function join_channel($command,$channel,$socket,$host){
$arrConfig = array(0 => '****', 1 => '****', 2 => '****', 3 => '****');
$pluginst = plugins::getModuleStatus($arrConfig, 'join');
if($command == ':!join' && $pluginst == '1'){
print 'join triggered';
$arrBasicInfo = db::user('basic', $host, '');
$arrBasicCommands = db::user('command', $host, '');
print 'pre ac accesed';
if ($arrBasicInfo[0]['AccessLevel'] >= 10) {
print 'ac passed';
fputs($socket, 'JOIN'.' '.$channel."\r\n");
# send_data('JOIN', $channel);
}
print 'function join';
}
}
if (isset($channel) && $command == ':!join'){
join_channel($command,$channel,$socket,$host[1]);
}