Well... I finally got around to working more on my bot. Which I test out frequently. and I figured well there are welcome messages. but are they like this? So decided to make it the way I did.
Basically what it does is reads a line from a file. and those lines read lines from another file. so the file it is reading looks something like this
Hello $nick $+ , would you like a $read(alcohol.txt) today?
Hello $nick $+ , would you like a $read(pop.txt) today?
and such on. So the chances of seeing the same Welcome message over and over (the same annoying message) are no longer a problem.
Granted this is an Easy welcome message. but I like it. because I have like a list of 5 different welcomes types. and like massive amounts of pops, alcohols, pies, and things like that. which would mean you have like a .001% chance of seeing the same welcome message.
and then so you can add more welcomes.
ex.
type
!aw Hello $nick $+ .
for it to add that line of text to the welcome file.
On *:Join:#:{
msg # $read(welcome.txt)
}
on *:text:!aw*:#:{
if ($nick isreg $chan) { msg # sorry only mod status can add welcomes }
if ($nick isop $chan) {
/write welcome.txt $nick $+: $2-
msg $chan Your greeting messege has been added.
}
}
@killerX This might be what your looking for:
on *:TEXT:?join*:#:{
if (!$(,$+(%,flood,$nick))) {
set -u3 $+(%,flood,$nick)
}
if ($address($nick,2) != $address($me,2)) {
notice $nick You need to be a Moderator of this bot to use this command.
return
}
notice $nick 5Conneting to $2 , Please wait......
if ($2 == $null) {
notice $nick 4Failed14 to join the channel because you didn't provide a channel name!
return
}
if ($me ison $2) {
.timer 1 3 notice $nick 4Failed14 to join $2 because I'm already in that channel!
return
}
set -u5 %!join $+ $2 $chan
join $2
}
else {
.timer 1 3 msg $chan 2Succesfully14 joined channel $chan
}
on *:JOIN:#:{
if ($eval($+(%,!join,$chan),2) != $null) {
.timer 1 3 msg $v1 3Successfully 5joined channel $chan
msg $chan 14I joined this channel because it was requested by the host of this Bot.
unset %!join $+ $chan
}
}
raw 474:*:{
if ($eval($+(%,!join,$2),2) != $null) {
notice Sphex 4Failed 14to join $2 because the bot has been banned from that channel.
unset %!join $+ $chan
}
}
Yah. I am still learning I am trying to look into a !join command to get my bot into another channel with out me having to put him in there.
which I know would look something like this
on @:text:!join*:{
join $2
}
But the thing is sometimes it is in a differant Ip.. such as mine is in a 199.9.249.114 and they want it into a ip that is 199.9.252.165.. I need to figure out how to make it so that it goes to that server to join the channel.
And Jethro with that I have I know it is basic. but I have fully tested it and it does exactly what I want it to do. I know your way would work to. It does not welcome the host (the mIRC bot). and thanks for the feed back.
Works fine, it seems, but too simple. Really, it's just a welcome message with a $read for a txt document in it, which is far too easy to do. Especially since you didn't provide a txt document. But I like the command added so you can change it from IRC without having to dig into your bot's txt documents. Nice touch.
Anyhow, glad you're starting to learn more mIRC! ;D
You do not want to welcome the client that runs the code, and you have to make sure welcome.txt exists or you'll get an error:
on !*:join:#: {
if ($isfile(welcome.txt)) { msg # $read(welcome.txt) }
}
on *:text:!aw *:#: {
if ($nick(#,$nick,vr)) {
msg # sorry only mod status can add welcomes!
}
else {
write welcome.txt $2-
msg # $nick $+ , your greeting messege has been added.
}
}