; $getasc - Roy ; Credits ; ------- ; This snippet may appear similar to Lindrian's $asc snippet, part of the snippet actually does what Lindrian's snippet does. ; I give credit to Lindrian for the original idea of the $chr demo. ; ------- ; Usage ; ------- ; $getasc(string).dem/chrform or nothing at all ; dem returns the string in a (chr) = (chr num) format ; chrform returns the string $chr(chr num)..
Or you could also try, I\'m a little fuzzy on this,
if ($left($did(aj,2).text,1) != $chr(35)) write $+($network,.,ajoin,.,txt) $+($chr(35),$did(aj,2).text) $did(aj,10).text
else { write $+($network,.,ajoin,.,txt) $did(aj,2).text $did(aj,10).txt }
Just in case someone makes a mistake, it already writes it for them.
--Roy
A couple of the features don\'t really need to be included. Why would you say if you are away when it already says the message when you leave. If you supported a timer, that would make a bit more sense. What I would like to see in this snippet is some more features. Such as a log feature or an input return feature. If you are messaging to an active channel, you should include a highlight feature.
As to the use of all those global variables, that isn\'t needed. Try using var %away = $$?=\"Enter away msg:\" and then using the $awaymsg identifier. Your %atime identifier isn\'t needed at all. You can use mIRC\'s built in identifier, $awaytime.
Could use a bit of work, and maybe a dialog if you are into those.
--Roy
@ mountaindew\'s code, You don\'t really need to specify if $2 is in the channel. It will still add to mIRC\'s internal list.
@ the original code and the author, You are not really checking the address and if $2 is specified. That could receive a pretty big error. You also neglect features such as a delete option or an edit option. Interesting idea, but the coding isn\'t quite complete.
--Roy
This snippet seems to be divided in three different sections. If you wanted to give a user a voice and a greet, you could. There is an auto-act section and an auto-greet section. So you could technically do what you are asking. This snippet isn\'t all to great. You might as well use hash tables for all the data. And why create a separate text file just for the use of dialog? I think $ini would work for that, I\'m not too sure, but it should. /help $ini. There are a few error checking bits you are missing. In your add nick alias, you forget to include an if ($1 && $2) to check if the user actually typed the strings. If I forgot to add the second, it would add it to the text & ini file. You also forget to check if the dialog name is in use when you type the command to open the dialog. Try adding an if ($dialog(nicksview)). And how about adding an edit option? It seems a bit of work to delete and then type the parameters. Nice concept, but not really good coding.
--Roy