You do seem to have a statement that, once called, would continue to attempt to call itself recursively :-
Code: Select all
proc putnot {nick msg} { putnot "NOTICE $nick :$msg" }
You are fortunate it failed, probably because the first time it called itself (the second time it executes overall, coincidentally) it does so with one argument but the proc needs two. Therefore it would not send to the IRCD ad nauseum. Lucky you.
If you particularly wanted the code in the format you pasted, then try the following :-
Code: Select all
bind PUB - !notice pNotice
proc pNotice {nick uhost hand chan rest} {
if {[string length [string trim $rest]] == 0} {
pOutput $nick "Message 1"
pOutput $nick "Message 2"
pOutput $nick "Message 3"
pOutput $nick "Message 4"
pOutput $nick "Message 5"
}
return 0
}
proc pOutput {nick msg} {putserv "NOTICE $nick :$msg"}
I favour the style of the previous poster. A list of responses set as a variable outside the bind proc gives greater flexibility, in case you wish to publish the script and allow users to configure their own messages.