我想做一个!permit命令,让用户发布一个链接20秒,而不会被阻止。如果他们不请求mod允许,他们将被超时。
此外,我正在寻找添加一个!alwayspermit,以便他们将始终有权张贴链接。
我不擅长这些东西,真的很糟糕。
这是我有的..。
on *:TEXT:!permit *:#: {
if (($nick isop #chan))
{ msg # I have permitted the user $+ $2 to post a link for 20 seconds }
}发布于 2014-06-02 14:14:07
首先,你的机器人需要在频道上进行操作。
如果有人不在许可或经常提交名单上张贴一个链接,他们将被踢
秒后,按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将在20秒内添加允许的nick
!permanent将添加永久许可的nick
!del nick将从允许列表中删除一个nick
https://stackoverflow.com/questions/23975377
复制相似问题