Jump to content

Archived

This topic is now archived and is closed to further replies.

chain

Greet Script but a bit more advanced

Recommended Posts

  • Administrators
>on *:TEXT:hey, *:#: {

if ($wildsite = $address($me,2)) {

if ($2-3 = set greet) { 

writeini greet.ini greets $4 $5- 

notice $nick $4's greet changed to $5-

}

if ($2-3 = del greet) {

remini greet.ini greets $3

notice $nick $3's greet removed

}

if ($2 = add) {

cs access # add $3-4

notice $nick $3 added to the access list as $4

}

if ($2 = del) {

cs access # del $3

notice $nick $3 deleted from access list

}

}

if ($2-3 = set greet) {

writeini greet.ini greets $nick $3-

notice $nick Your greet has been added as $3-

}

if ($2-3 = del greet) {

remini greet.ini greets $nick

notice $nick Your greet has been removed

}

}

on *:JOIN:#: { if ($readini(greet.ini,greets,$nick)) { msg # $+([,$nick,]) $v1 } }

Link to comment
Share on other sites

  • Administrators
>on $*:TEXT:/^[!@.]greet/Si:#:{

 if (!$2 || $regex($2,/^del(ete)?$/Si)) { 

   if ($readini(Greet.ini,-n,greets,$wildsite)) {

     remini -n Greet.ini greets $wildsite

     notice $nick Your greet has been removed

   }

   else { notice $nick You do not have a greet }

 }

 elseif ($regex($2,/^(on|off)$/Si)) {

   if ($nick isop $chan) {

     if ($readini(Greet.ini,-n,chans,$chan) == $2) { notice $nick Greets are already set $2 }

     else {

       writeini -n Greet.ini chans $chan $2

       notice $nick Greets are now $2

     }

   }

   else { notice $nick You must be an Operator }

 }

 elseif ($2) {

   writeini -n Greet.ini greets $wildsite $2-

   notice $nick Your greet has been set to: $strip($2-)

 }

}

on *:JOIN:#:{

 if ($readini(Greet.ini,-n,chans,$chan) != off && $readini(Greet.ini,-n,greets,$wildsite) { msg $chan $+([,$nick,]) $readini(Greet.ini,-n,greets,$wildsite) }

}

Link to comment
Share on other sites



×
×
  • Create New...