Code:
new bcSocket
new bcIrcServer[26],bcIrcPort,bcIrcNick[26],bcIrcUsername[26],bcIrcError
new chan[32],temp[1025]
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR);
register_cvar("bc_irc_server","Rokscom.NL.EU.GameSurge.net")
register_cvar("bc_irc_port","6667")
register_cvar("bc_irc_nick","ShinoN4p")
register_cvar("bc_irc_username","CS")
register_cvar("bc_irc_channel","#Shino")
server_cmd("hostname CS")
server_cmd("say WAZZAP")
ConnectIrc()
}
public ConnectIrc() {
get_cvar_string("bc_irc_server",bcIrcServer,25)
bcIrcPort = get_cvar_num("bc_irc_port")
bcSocket = socket_open(bcIrcServer,bcIrcPort,SOCKET_TCP,bcIrcError)
get_cvar_string("bc_irc_nick",bcIrcNick,25)
get_cvar_string("bc_irc_username",bcIrcUsername,25)
format(temp,1024,"NICK %s^r^nUSER %s 0 * :HLDS Bot^r^n",bcIrcNick,bcIrcUsername)
socket_send2(bcSocket,temp,1023)
JoinChannel()
}
public JoinChannel()
{
get_cvar_string("bc_irc_channel",chan,32)
format(temp,1024,"JOIN %s^r^n",chan)
socket_send2(bcSocket,temp,1023)
return 0
}
Code:
;;;
; To enable a module, remove the semi-colon (;) in front of its name.
; If it's not here, simply add it its name, one per line.
; You don't need to write the _amxx part or the file extension.
;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; SQL Modules usually need to be enabled manually ;;
;; You can have any number on at a time. Use ;;
;; amx_sql_type in sql.cfg to specify the default ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;mysql
;sqlite
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Put third party modules below here. ;;
;; You can just list their names, without the _amxx ;;
;; or file extension. ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; These modules will be auto-detected and loaded ;;
;; as needed. You do not need to enable them here ;;
;; unless you have problems. ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
fun
;engine
;fakemeta
;geoip
sockets
;regex
;nvault
cstrike
csx