on *:text:!avail:#yourchan: {
if ($istok($remove($chan($chan).topic,44),$nick,32)) { .notice $nick You are already available. | return }
if ($gettok($chan($chan).topic,2,58) == $null) { topic $chan Available: $nick }
else topic $chan $chan($chan).topic $+ , $nick
}
* Change #yourchannel to whatever channel you want this for.
Note that you probably want to set a user level to this...
example:
on 100:text:!avail:#youchannel: {
Then, you set your ops (or whoever) to that level and only they could use the command.
Also, here's a unavailable script for you:
on *:text:!unavail:#yourchan: {
if (!$istok($remove($chan($chan).topic,44),$nick,32)) { .notice $nick You are already unavailable. | return }
topic $chan $remove($chan($chan).topic,$nick $+ $chr(44),$nick)
}
Again, you may want to use a user level for this, and change #yourchannel to whatever channel you want this for.
**EDIT** Thanks to Kelder's script below, I realized you could use $chan($chan).topic to get the topic... I had forgotten about that. So, I've edited this to use that. No need for variables now.