Ok, I am inserting data into my database as a value for a variable and when my bot loads up it sets the value to that variable. Anyways, if there is more than 1 word as the value it outputs it like this {command1 command2}
so If I type
@set commands command1
and then type @commands it says
command1
but if I type @set commands command1 command2
and then type @commands it says
{command1 command2}
When I look in the database there is no { or }
but its in the output where it has { and }
This is my line that ouputs the data..
putserv "notice $nick :[lrange [array get [string range $arg 1 end] $chan] 1 end]"
elseif {[string tolower [lindex [split $arg] 0]] == "$chan_trigger($chan)set"} {
if {[isop $nick $chan]} {
set command_input [string tolower [join [lindex $arg 1 ]]]
set command_input_value "[lrange $arg 2 end]"
putlog "Setting $command_input to $command_input_value for $chan"
set ${command_input}($chan) $command_input_value
set result [mysql_query "SELECT command_name FROM bot_commands WHERE command_chan='$chan' && command_name='$command_input'"]
if {[info exist result]} {
foreach row $result {
foreach element $row {
if {$chan_bot(${chan}) == "$botnick"} {
set update_command [mysql_query "UPDATE bot_commands SET command_value='$command_input_value' WHERE command_name='$command_input' && command_chan='$chan'"]
global $command_input
set ${command_input}($chan) $command_input_value
putlog "Set command value"
rehash
putnotc $nick "Set $command_input to '$command_input($chan)'"
}
}
}
}
thats just a bit of the code, its a huge proc, but uhh where it goes set ${command_input}($chan) its like not overwritting the variable.. like it should.