|
Joined: Sep 2006
Posts: 43
Ameglian cow
|
OP
Ameglian cow
Joined: Sep 2006
Posts: 43 |
I know there is a way to make an on join message but is there a way after sending the message that it logs the name so it will NOT send them that message next time they join?
Example bob joins #chan1 <mybot> hello bob if you need help with bots type !help and I will private message you the bots commands ***This is a one time message but you can use !help at any time*** jane joins #chan1 <mybot> hello jane if you need help with bots type !help and I will private message you the bots commands ***This is a one time message but you can use !help at any time*** Bob left #chan1 2 days later bob joins but the bot knows he was sent the message already so does not send the message.
any idea? also I would like to manually add people that already know the commands and do not need to get this message
|
|
|
|
Joined: Apr 2007
Posts: 2
Bowl of petunias
|
Bowl of petunias
Joined: Apr 2007
Posts: 2 |
Just a thought, why not write the join nicks to text and use a halt if nick isin on *:JOIN:#: {
if ($nick isin $read(nicks.txt,w,$+(*,$nick))) { halt }
else /write nicks.txt $nick
/msg # your text
}
Last edited by Variable; 07/04/07 11:30 AM.
|
|
|
|
Joined: Jan 2007
Posts: 259
Fjord artisan
|
Fjord artisan
Joined: Jan 2007
Posts: 259 |
This has been done before. Use the search feature.
on !1:join:#chan1,#chan2:{
var %x = $hget(welcomed. $+ $chan,0).item
while (%x) {
if ($hget(welcomed. $+ $chan,%x).item iswm $fulladdress) {
return
}
dec %x
}
hadd -mu1800 welcomed. $+ $chan $wildsite
.notice $nick Welcome to $+($chan,!)
}
That will send a message once every 30 minutes, and match their hostmask instead of nickname. Of course, you'll need to change #chan1,#chan2 to your channel, and add it to your remotes (ALT + R). You can change the "hadd -mu1800 ..." to "hadd -mu86400 ..." for 24 hours, etc. The number is in seconds, so you'll have to calculate it a bit to find the value.
Those who can, cannot. Those who cannot, can.
|
|
|
|
Joined: Sep 2006
Posts: 43
Ameglian cow
|
OP
Ameglian cow
Joined: Sep 2006
Posts: 43 |
1. Their hostmask is not shown that is why I said name. 2. I did use search. 3. Just because you THINK someone did not use search does not mean they did not use it. This has been done before. Use the search feature.
on !1:join:#chan1,#chan2:{
var %x = $hget(welcomed. $+ $chan,0).item
while (%x) {
if ($hget(welcomed. $+ $chan,%x).item iswm $fulladdress) {
return
}
dec %x
}
hadd -mu1800 welcomed. $+ $chan $wildsite
.notice $nick Welcome to $+($chan,!)
}
That will send a message once every 30 minutes, and match their hostmask instead of nickname. Of course, you'll need to change #chan1,#chan2 to your channel, and add it to your remotes (ALT + R). You can change the "hadd -mu1800 ..." to "hadd -mu86400 ..." for 24 hours, etc. The number is in seconds, so you'll have to calculate it a bit to find the value.
|
|
|
|
Joined: Jan 2007
Posts: 259
Fjord artisan
|
Fjord artisan
Joined: Jan 2007
Posts: 259 |
1. You did not use search. 2. Explain to me how their hostmask is not shown. 3. Just because you're too lazy to change a few lines of code and/or you're not intelligent enough to understand a simple scripting language does not mean you should be rude to people for attempting to help you. 1. Their hostmask is not shown that is why I said name. 2. I did use search. 3. Just because you THINK someone did not use search does not mean they did not use it. This has been done before. Use the search feature.
on !1:join:#chan1,#chan2:{
var %x = $hget(welcomed. $+ $chan,0).item
while (%x) {
if ($hget(welcomed. $+ $chan,%x).item iswm $fulladdress) {
return
}
dec %x
}
hadd -mu1800 welcomed. $+ $chan $wildsite
.notice $nick Welcome to $+($chan,!)
}
That will send a message once every 30 minutes, and match their hostmask instead of nickname. Of course, you'll need to change #chan1,#chan2 to your channel, and add it to your remotes (ALT + R). You can change the "hadd -mu1800 ..." to "hadd -mu86400 ..." for 24 hours, etc. The number is in seconds, so you'll have to calculate it a bit to find the value. Edit: Forgot to add your quote for added effect.
Last edited by Kardafol; 07/04/07 04:54 PM.
Those who can, cannot. Those who cannot, can.
|
|
|
|
Joined: Sep 2006
Posts: 43
Ameglian cow
|
OP
Ameglian cow
Joined: Sep 2006
Posts: 43 |
I was trying to be rude you came across as rude with your comment
It has been a long times since I scripted in Mirc I have forgotten allot and allot has been added.
as for search I looked thru all 201 search results (some are on the same thread)
on this server you see your own host mask for everyone
example my hostmask is say mcownage@200.200.200.200 when I do a whois or they join i see bob(mcownage@200.200.200.200) /whois bob bob is mcownage@200.200.200.200 * McOwnage (this is always the person that does the whois info the rest is the person ya did whois to bob on #chan1 #chan2 .#chan3 bob using random.fakeserver.net fakename Chat Service bob is a registered nick bob has been idle 1hr 43mins 36secs, signed on Fri Apr 06 19:22:27 bob End of /WHOIS list
don't ask how they set that up but they did
|
|
|
|
Joined: Jan 2007
Posts: 259
Fjord artisan
|
Fjord artisan
Joined: Jan 2007
Posts: 259 |
See? Isn't it easier to communicate to other people when we're polite? You can simply change:
on !1:join:#chan1,#chan2:{
var %x = $hget(welcomed. $+ $chan,0).item
while (%x) {
if ($hget(welcomed. $+ $chan,%x).item iswm $fulladdress) {
return
}
dec %x
}
hadd -mu1800 welcomed. $+ $chan $wildsite
.notice $nick Welcome to $+($chan,!)
}
to:
on !1:join:#chan1,#chan2:{
var %x = $hget(welcomed. $+ $chan,0).item
while (%x) {
if ($hget(welcomed. $+ $chan,%x).item iswm $fulladdress) {
return
}
dec %x
}
hadd -mu1800 welcomed. $+ $chan $gettok($address($nick,0),1,64) $+ @*
.notice $nick Welcome to $+($chan,!)
}
Then, if you want to save the data, you can use (will keep data intact after you restart the bot):
on !1:join:#chan1,#chan2:{
if (($hget(welcomed. $+ $chan) == $null) && ($isfile($scriptdirjoinsg.hsh)) {
hload -bi welcomed. $+ $chan $qt($scriptdirjoinmsg.hsh) $chan
}
var %x = $hget(welcomed. $+ $chan,0).item
while (%x) {
if ($hget(welcomed. $+ $chan,%x).item iswm $fulladdress) {
return
}
dec %x
}
hadd -mu1800 welcomed. $+ $chan $gettok($address($nick,0),1,64) $+ @*
hsave -bi welcomed. $+ $chan $qt($scriptdirjoinmsg.hsh) $chan
.notice $nick Welcome to $+($chan,!)
}
You can remove the "u1800" (1800 seconds until the join message can be sent again), if you want the message to be sent only once.
Those who can, cannot. Those who cannot, can.
|
|
|
|
Joined: Sep 2006
Posts: 43
Ameglian cow
|
OP
Ameglian cow
Joined: Sep 2006
Posts: 43 |
First Thank you I took your statement wrong after I re-reading it i see it was not rude I am SORRY just got home from work put script in and get this when someone joins * /if: invalid format (line 12, script.ini) line 12 is
if (($hget(welcomed. $+ $chan) == $null) && ($isfile($scriptdirjoinsg.hsh)) {
been a while but may be missing a ) I count 14 ( and 13 ) between the first { and last } but no clue where to put the 14th ) I tried adding one here on this line
if (($hget(welcomed. $+ $chan) == $null) && ($isfile($scriptdirjoinsg.hsh))) {
but nothing happens (no error no message)
|
|
|
|
Joined: Jan 2007
Posts: 259
Fjord artisan
|
Fjord artisan
Joined: Jan 2007
Posts: 259 |
on !1:join:#channel1,#chan2:{
if (($hget(welcomed. $+ $chan) == $null) && ($isfile($scriptdirjoinsg.hsh))) {
hload -bi welcomed. $+ $chan $qt($scriptdirjoinmsg.hsh) $chan
}
var %x = $hget(welcomed. $+ $chan,0).item
while (%x) {
if ($hget(welcomed. $+ $chan,%x).item iswm $fulladdress) {
return
}
dec %x
}
hadd -mu1800 welcomed. $+ $chan $gettok($address($nick,0),1,64) $+ @*
hsave -bi welcomed. $+ $chan $qt($scriptdirjoinmsg.hsh) $chan
.notice $nick Welcome to $+($chan,!)
}
This is working for me, and you can do: /hadd welcomed.#channel nickname!*@*/*!ident@*then /hop to have it never send a message to anyone matching that mask. If you removed the u1800, then you should remove joinmsg.hsh, and type [/b]/hfree -w welcomed.*[/b], to clear all the lists, incase something was added. Alternatively, you can put your bot in a new channel, and join there to see if it works or not.
Those who can, cannot. Those who cannot, can.
|
|
|
|
Joined: Sep 2006
Posts: 43
Ameglian cow
|
OP
Ameglian cow
Joined: Sep 2006
Posts: 43 |
That worked Thank you allot
|
|
|
|
|