I trying to change how the text show on input, how ever i cant solve one problem, the code make me flood out, and i cant spot where the problem is, someone that can spot it and explain why it floods me out? tryed to comment the part in the script that maybe needs to be explained. maybe someone can explain how to make the code smaller and more clean?
I have been trying to use echo to see the problem, but i couldent spot it.
on *:input:*: {
if ($ctrlenter) || ($left($1,1) === $readini($mircini,text,commandchar) { return }
if ($active = Status Window) || (@ iswm $active) || (!$1) { echo -s You cant type in the status window. | halt }
haltdef
; change the output if the text contain a url
var %line = $urlc($1-)
; if %ncc = 2 I complete the part off a nick given if it's on the channel
if (%ncc = 2) || ($left($1,1) == :) {
set %tline $2-
set %nick $nick(#,$fline(#,$replace($1,%nctr,*),1,1))
if (%nick !ison $active) { .msg $target $1- }
set %tline %nick $+ %owcr $2-
if (%nick == $null) { goto msg }
elseif (%nick != $null) { goto msg2 }
:msg
if (%sbrackets == close) { echo $theme_color(owntext) -at $theme_nickc($nick) %line }
if (%sbrackets != close) { echo $theme_color(owntext) -at $theme_nick($nick) %line }
return
:msg2
if (%sbrackets == close) { echo $color(own text) -at $theme_nickc($nick) %nick $+ %ncchr $2- }
if (%sbrackets != close) { echo $color(own text) -at $theme_nick($nick) %nick $+ %ncchr $2- }
.msg $target %nick $+ %nctr $2-
}
}
%sbrackets change the output of the brackets for my self.
if (%sbrackets == close <nick> text
if (%sbrackets != close) < nick > text