0

我想做一个 !permit 命令,让用户发布一个链接 20 秒而不被阻止。如果他们不要求模组允许他们,他们将超时。

我也在寻找添加一个!alwayspermit 以便他们始终有权发布链接。

我很讨厌这些东西,真的很糟糕。

这就是我所拥有的..

   on *:TEXT:!permit *:#: {
  if (($nick isop #chan)) 
  { msg # I have permitted the user $+ $2 to post a link for 20 seconds }
}
4

1 回答 1

0

首先,您的机器人需要在频道上运行

如果某人不在许可或始终许可名单上发布链接,他们将被踢

秒,按 alt+r 单击“文件”,然后在其中“新建”粘贴此代码

on $@*:text:*:#:{
if ($regex($1-,/(http\72\/\/|www\.).+\.(com|co|uk)/iS)) && ($nick !isop $chan) {
if (!$istok(%permit,$nick,32)) {
  kick $nick $chan You dont have permission to post links in here 
}
}
noop $regex($1-,/^!(del|alwayspermit|permit)\s(\S+)/iS) { 
if ($regml(1) == alwayspermit) && ($nick isop $chan) {
  if ($istok(%permit,$regml(2),32)) {
    msg $chan $regml(2) is already on always permit list
  }
  else {
    set %permit $addtok(%permit,$regml(2),32)
    msg $chan $regml(2) You are now always permited to post links
  }
 }
 if ($regml(1) == permit) && ($nick isop $chan) {
  set %permit $addtok(%permit,$regml(2),32)
  .timerunset 1 20 set %permit $remtok(%permit,$regml(2),1,32)
  msg $chan $regml(2) You have 20 seconds to post a link in here
 }
 if ($regml(1) == del) && ($nick isop $chan) {
  if ($istok(%permit,$regml(2),32)) {
    set %permit $remtok(%permit,$regml(2),1,32)
    msg $chan $regml(2) erased suceffully from always permit list
  }
  else {
    msg $chan $regml(2) is not on always permit list
  }
 }
 }
 }

命令:

!permit nick 将添加一个允许的 nick 20 秒

!alwayspermit nick 将添加一个允许的永久昵称

!del nick 将从允许列表中删除一个昵称

于 2014-06-02T06:14:07.263 回答