PDA

View Full Version : change cmd in iojTQ


razoor
12-24-2006, 12:23 AM
How can i change the !help command in iojTQ.
i want it to be somethin else. it didn´t work to just change bind pub.
So i guess i need to change in som emore places.
annyone know how? =)

jeza
12-25-2006, 11:51 AM
in iojTQ.tcl search for proc iojTQ:Help {nick uhost hand chan text}
there u can change the text

razoor
12-26-2006, 06:06 AM
hmm, if i change that then i wont get the help at all. :confused:

jeza
12-26-2006, 12:03 PM
this will help i hope :D


this is the code:

proc iojTQ:Help {nick uhost hand chan text} {

global iojTQ botnick

set dest ""
if { $iojTQ(send_help) == 0 } { set dest $chan }
if { $iojTQ(send_help) == 1 } { set dest $nick }

if { $iojTQ(debug) } { putlog "..iojTQ...: SHOWiNG HELP to '$nick'" }

sm $dest "$iojTQ(cmdp)help.................................. .............. HELP"
if { $iojTQ(enable_bnc) } { sm $dest "$iojTQ(cmdp)bnc <sitename>...................................... Show BNCs" }
if { $iojTQ(enable_bnc) } { sm $dest "$iojTQ(cmdp)bnctest <sitename>.................................. Test BNCs" }
if { $iojTQ(enable_rescan) } { sm $dest "$iojTQ(cmdp)rescan site.name /full/path/ <full_file_name>....... RESCAN <file_name>" }
if { $iojTQ(enable_sections) } { sm $dest "$iojTQ(cmdp)sections.............................. .............. Show SECTiONS" }
if { $iojTQ(enable_affils) } { sm $dest "$iojTQ(cmdp)affils................................ .............. Show AFFiLS" }
if { $iojTQ(enable_banned) } { sm $dest "$iojTQ(cmdp)banned................................ .............. Show BANNED GROUPS" }
if { $iojTQ(enable_user_rank) } { sm $dest "$iojTQ(cmdp)rank <login> <stats>................................ Show Rank On All Sites (dayup,daydn,wkup,wkdn,monthup,monthdn,allup,alldn )" }
if { $iojTQ(enable_trial) || $iojTQ(enable_quota)} { sm $dest "$iojTQ(cmdp)passed <login>...................................... TRiAL/QUOTA STATS Of <login>" }
if { $iojTQ(enable_trial) } { sm $dest "$iojTQ(cmdp)trials................................ .............. Show USER(s) On TRiAL" }
if { $iojTQ(enable_quota) } { sm $dest "$iojTQ(cmdp)quotas................................ .............. Show USER(s) On QUOTA" }
if { $iojTQ(enable_site_transfer) } { sm $dest "$iojTQ(cmdp)transfer login pass MB FROM TO...................... Credits Transfer /QUERY $botnick" }

if { $chan == $iojTQ(admin_chan) } {
if { $iojTQ(enable_rehash) } { sm $dest "$iojTQ(cmdp)rehash................................ .............. Send REHASH Command To BOT" }
sm $dest "$iojTQ(cmdp)disabledsites......................... .............. Show LiST of DiSABLED SiTES"
if { $iojTQ(enable_die) } { sm $dest "$iojTQ(cmdp)kill.................................. .............. Send DIE Command To BOT" }
if { $iojTQ(enable_save) } { sm $dest "$iojTQ(cmdp)save.................................. .............. SAVE STATS FiLES" }
if { $iojTQ(enable_site_commands) } { sm $dest "$iojTQ(cmdp)ftp <SITE COMMAND>.................................. SEND <SITE COMMAND> To All SiTES" }
if { $iojTQ(enable_site_commands) } { sm $dest "$iojTQ(cmdp)ftp SiTE.NAME <SITE COMMAND>........................ SEND <SITE COMMAND> To SiTE.NAME" }
if { $iojTQ(enable_site_commands) } { sm $dest "$iojTQ(cmdp)addgadmin <SITE COMMAND FOR GADDUSER>............... ADD GADMIN" }
}

return

}


1. example
this line for example will be allways displayed

sm $dest "$iojTQ(cmdp)help.................................. .............. HELP"

'sm' means command to send message
'$dest' means to where to send (channel or nickname)
'"$iojTQ(cmdp)help.................................. .............. HELP"' this is the actualy text that willbe displayed to user
'$iojTQ(cmdp)' is the command prefix (!help for example)

2. example

'if { $iojTQ(enable_bnc) } { sm $dest "$iojTQ(cmdp)bnc <sitename>...................................... Show BNCs" }'

'if { $iojTQ(enable_bnc) }' means that this line will be shown only if iojTQ(enable_bnc) is set to 1

3. example
command inside this loop are shown only if typed in admin chan

if { $chan == $iojTQ(admin_chan) } {

}



u can now change help with own text
4. example

proc iojTQ:Help {nick uhost hand chan text} {

global iojTQ botnick

set dest ""
if { $iojTQ(send_help) == 0 } { set dest $chan }
if { $iojTQ(send_help) == 1 } { set dest $nick }

if { $iojTQ(debug) } { putlog "..iojTQ...: SHOWiNG HELP to '$nick'" }

sm $dest "$iojTQ(cmdp) this will allways show my command prefix"
if { $iojTQ(enable_bnc) } { sm $dest "this text is shown if my 'iojTQ(enable_bnc)' is 1" }

if { $chan == $iojTQ(admin_chan) } {
sm $dest "this command is shown only in admin chan"
if { $iojTQ(enable_bnc) } { sm $dest "this text is shown if my 'iojTQ(enable_bnc)' is 1 AND command is typed in admin chan" }
}

return

}

razoor
12-26-2006, 02:49 PM
Ok. either im dumb, so i dont get what you mean, or you don´t get what i meane..lol
I want to change the cmd on chan from !help to !ophelp, how do i achive that.
So i can get tha help list with !ophelp on the chan.
Point in red what i have to change, caus i have changed everywhere, but nothing helps. =)

jeza
12-27-2006, 03:27 AM
hehe

in iojTQ.tcl find 'proc iojTQ:BLOWFiSH {nick uhost hand chan arg}' (line 2322 by default config)
there is
if { [lindex $cmdline 0] == "$iojTQ(cmdp)help" } {
set darg [lrange $cmdline 1 end]
iojTQ:Help $nick $uhost $hand $chan $darg
}
change to
if { [lindex $cmdline 0] == "!ophelp" } {
set darg [lrange $cmdline 1 end]
iojTQ:Help $nick $uhost $hand $chan $darg
}

next find 'bind pub -|- [set iojTQ(cmdp)]help iojTQ:Help' (line 2481 in default config)
and change to
bind pub -|- [set !ophelp iojTQ:Help

razoor
12-27-2006, 04:36 AM
That did the trick, Thanks jeza. =)