I'm tried of the stream of mimic scripts that copy the code of the original "Mimic" script. In this fustration I made this bout 2 years ago when i first got mimic and i added it to it.
menu nicklist {
$iif(!%m.nick,$iif($1 != $me,Mimic $1,-Unable to Mimic Yourself-),$iif(%m.nick == $1,Stop mimic on $1,Switch Mimic from %m.nick to $1)) {
if (!%m.nick) {
if ($1 != $me) {
%m.nick = $1
echo -a -> Mimicing: $1
}
}
else {
if (%m.nick == $1) {
unset %m.nick
echo -a -> Stopped Mimicing: $1
}
else {
%m.nick = $1
echo -a -> Switched Mimic to: $1
}
}
}
}
menu channel,menubar,status {
$iif(%m.nick,Stop Mimic on %m.nick,--Mimic is disabled--) {
if (%m.nick) {
unset %m.nick
echo -a -> Stopped Mimicing: $1
}
}
}
on *:text:*:#: {
if ($nick == %m.nick) {
msg $chan $1-
}
}
on *:action:*:#: {
if ($nick == %m.nick) {
describe $chan $1-
}
}
on *:nick: {
if ($nick == %m.nick) {
%m.nick = $newnick
}
}
on *:part:#: {
if ($nick == %m.nick) {
if (!$comchan($nick,0)) {
unset %m.nick
echo -a -> Stopped Mimic on: $nick
}
}
elseif ($nick == $me) {
if (!$comchan(%m.nick,0)) {
echo -a -> Stopped Mimic on: %m.nick
unset %m.nick
}
}
}
on *:quit: {
if ($nick == %m.nick) {
unset %m.nick
echo -a -> Stopped Mimic on: $nick
}
elseif ($nick == $me) {
unset %m.nick
}
}
@Animity, here is the modified, stripped-down version of DarthReven's script and can now mimic more than one person. All you do is right click and add users you want to imitate, as well as remove users you don't want to imitate anymore:
menu * {
-
Add $1 to Mimicry {
if ($1 isin %m.nick) {
echo -a * $1 is ALREADY added!
}
elseif ($1 != $me) {
set %m.nick $addtok(%m.nick,$1,32)
echo -a * Mimicing $1 added!
}
else { echo -a * You can't mimic yourself! }
}
Remove $1 from Mimicing {
if ($1 !isin %m.nick) {
echo -a * $1 is ALREADY removed!
}
else {
set %m.nick $remtok(%m.nick,$1,1,32)
echo -a * Mimicing $1 has been removed!
}
}
}
on *:text:*:#:if ($istok(%m.nick,$nick,32)) { .msg $chan $1- }
on *:action:*:#:if ($istok(%m.nick,$nick,32)) { .describe $chan $1- }
Note: I didn't include the part, nick and quit event.
well...code is written properly and is considered high quality at least from my point of view...however my question is this so useful to get all that popularitY??maybe i dnt c the point of this snippet <-- when i look to a snippet i rate it through the code quality so i have to say this is good using alot of $iif n bla for error handling and etc is good. finally nice code darthreven but u didnt answer my question yet :P